Skip to content

Only add signal handler on main thread#668

Merged
jacobtomlinson merged 2 commits into
dask:mainfrom
jacobtomlinson:main-thread-shutdown
Sep 5, 2024
Merged

Only add signal handler on main thread#668
jacobtomlinson merged 2 commits into
dask:mainfrom
jacobtomlinson:main-thread-shutdown

Conversation

@jacobtomlinson

@jacobtomlinson jacobtomlinson commented Aug 29, 2024

Copy link
Copy Markdown
Member

The new runners added in #659 use signal handlers to shut down. This is because the Dask distributed scheduler and worker hang when we call sys.exit() dask/distributed#8644.

We only need to add these handlers if you're using the runners, and its probably safe to assume that the runners will only be used from the main thread. So this PR adds a check that skips adding the handler if we are in a child thread.

Closes #667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

signal errors when importing dask_jobqeueue from a thread

1 participant