File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1919logger = logging .getLogger (__name__ )
2020
2121
22- if threading .current_thread () != threading .main_thread ():
23- raise ImportError ('The psij module must be imported from the main thread.' )
24-
25-
2622def _handle_sigchld (signum : int , frame : Optional [FrameType ]) -> None :
2723 _ProcessReaper .get_instance ()._handle_sigchld ()
2824
2925
30- signal .signal (signal .SIGCHLD , _handle_sigchld )
26+ if threading .current_thread () != threading .main_thread ():
27+ logger .warning ('The psij module is being imported from a non-main thread. This prevents the'
28+ 'use of signals in the local executor, which will slow things down a bit.' )
29+ else :
30+ signal .signal (signal .SIGCHLD , _handle_sigchld )
3131
3232
33- _REAPER_SLEEP_TIME = 0.2
33+ _REAPER_SLEEP_TIME = 0.1
3434
3535
3636class _ProcessEntry (ABC ):
You can’t perform that action at this time.
0 commit comments