-
-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend-utils: Get rid of deadlocks in AsyncExecutor
3d04971 was the first approach to eliminating deadlocks caused by waking a task from another one. A task may also try to wake itself, and that case was unfortunately not covered. This patch rewrites the AsyncExecutor to use an async channel for queuing tasks instead of a flag. Using a flag required holding a lock for a task which was problematic when a task needed to be awoken. A flag also required doing a full search through tasks each poll, which could be ineffective.
- Loading branch information
1 parent
31d8d98
commit f30c04e
Showing
2 changed files
with
60 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters