Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: Tracking down a deadlock in async-channel
There was a deadlock where notifications would not get delivered for listeners that were stuck in the fallback queue. There is an optimization where the notification count is checked to see if the notifications delivered by the user would make any impact on the listener chain; if it wouldn't, then it isn't done at all. For no_std, I've removed this optimization, as I doubt that it can be done consistently due to the nature of the fallback queue. During testing I also uncovered problems with the current implementation of the fallback queue itself. I've replaced it with concurrent-queue for now, as I doubt that a fully functioning queue wouldn't be trivial enough to justify inlining it into event-listener itself. Unfortunately it adds three additional dependencies to the tree of event-listener. With this change, the async-channel tests pass consistently. Signed-off-by: John Nunley <[email protected]>
- Loading branch information