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

Solve inter-pool deadlocks #449

Merged
merged 2 commits into from
Oct 6, 2017
Merged

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Sep 25, 2017

Registry::in_worker() now calls a distinct Registry::in_worker_cross
when a WorkerThread is found for the current thread, but it's not
part of this Registry's pool. We use a new TickleLatch which will
awaken a pool when it's set. Then the current thread can go process
other work from its own pool, possibly going to sleep when idle, and
still be notified when the other pool finishes the new work.

`Registry::in_worker()` now calls a distinct `Registry::in_worker_cross`
when a `WorkerThread` *is* found for the current thread, but it's not
part of this `Registry`'s pool.  We use a new `TickleLatch` which will
awaken a pool when it's set.  Then the current thread can go process
other work from its own pool, possibly going to sleep when idle, and
still be notified when the other pool finishes the new work.
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.

2 participants