summaryrefslogtreecommitdiff
path: root/remote_worker.py
diff options
context:
space:
mode:
authorScott <[email protected]>2022-01-06 12:13:34 -0800
committerScott <[email protected]>2022-01-06 12:13:34 -0800
commit5f75cf834725ac26b289cc5f157af0cb71cd5f0e (patch)
treef31baf4247a7d29eb1457a74f75d373d10539237 /remote_worker.py
parentba223f821df1e9b8abbb6f6d23d5ba92c5a70b05 (diff)
A bunch of changes...
Diffstat (limited to 'remote_worker.py')
-rwxr-xr-xremote_worker.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/remote_worker.py b/remote_worker.py
index c04ac65..0086c40 100755
--- a/remote_worker.py
+++ b/remote_worker.py
@@ -83,6 +83,7 @@ def main() -> None:
in_file = config.config['code_file']
out_file = config.config['result_file']
+ stop_thread = None
if config.config['watch_for_cancel']:
(thread, stop_thread) = watch_for_cancel()
@@ -130,8 +131,9 @@ def main() -> None:
stop_thread.set()
sys.exit(-1)
- stop_thread.set()
- thread.join()
+ if stop_thread is not None:
+ stop_thread.set()
+ thread.join()
if __name__ == '__main__':