Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workers inside workers #3586

Merged
merged 9 commits into from
Oct 30, 2023
Merged

Workers inside workers #3586

merged 9 commits into from
Oct 30, 2023

Conversation

rodrigogiraoserrao
Copy link
Contributor

This makes it so that calling workers inside workers works out of the box in all cases, which fixes #3472.
Depending on whether you were calling a threaded worker or not, you could have trouble calling new workers.

Previously you couldn't call a threaded worker from another threaded worker because creating a worker was not thread safe (see #3472). However, the second threaded worker could already be called with self.call_from_thread, so we bake that in.
Move the change into run_worker to make that thread-safe as well, instead of just the decorator.
@rodrigogiraoserrao rodrigogiraoserrao marked this pull request as ready for review October 26, 2023 10:11
@darrenburns darrenburns changed the title Wokers inside workers Workers inside workers Oct 26, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Dave Pearson <[email protected]>
@rodrigogiraoserrao rodrigogiraoserrao merged commit 3f33cd1 into main Oct 30, 2023
23 checks passed
@rodrigogiraoserrao rodrigogiraoserrao deleted the wokers-inside-workers branch October 30, 2023 10:26
@rodrigogiraoserrao rodrigogiraoserrao self-assigned this Oct 30, 2023
@rodrigogiraoserrao rodrigogiraoserrao added bug Something isn't working Task labels Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling a thread worker from within a thread worker results in a crash
2 participants