-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor shutdown handlers and fix test
In the parent feature, some changes to the test runtime were made, but they weren't representative of what a normal runtime would do. This was due to a bug that was fixed in another branch that this is based off of. I reverted the changes to the runtime and reorganized the test to read more clearly. At the same time, I refactored `shutdown_reader` and `shutdown_writer`. We were checking `is_active` twice in `shutdown_writer`, and it wasn't clear if that was necessary. I also became curious of why we only wake the reader/writer if there is no request. Presumably, if our actions on the request cause it to wake the reader, then the wake call will be a no-op anyway. I reorganized the code to both make the two implementations more parallel and a bit more straightforward. This also meant we could drop the extra wakes in shutdown.
- Loading branch information
Showing
2 changed files
with
31 additions
and
36 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