We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a88e073 commit b07308eCopy full SHA for b07308e
dask_jobqueue/runner.py
@@ -4,6 +4,7 @@
4
import signal
5
from contextlib import suppress
6
from enum import Enum
7
+import threading
8
from typing import Dict, Optional
9
import warnings
10
from tornado.ioloop import IOLoop
@@ -15,7 +16,10 @@
15
16
17
18
# Close gracefully when receiving a SIGINT
-signal.signal(signal.SIGINT, lambda *_: sys.exit())
19
+# We use SIGINT to shut down because the scheduler and worker hang
20
+# if we call sys.exit() see https://github.com/dask/distributed/issues/8644
21
+if threading.current_thread() is threading.main_thread():
22
+ signal.signal(signal.SIGINT, lambda *_: sys.exit())
23
24
25
class Role(Enum):
0 commit comments