-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine the check and attach loops. (#205)
This is mostly a performance optimization. We notice that we *always* attempt to detach the condition, regardless of whether we've attached it to begin with. We can use that to our advantage, in that during the initial iteration to check if something has triggered, we can also attach at the same time. This saves us from having to iterate over the wait set again later on. There is a downside here in that we may end up attaching things that we didn't need, but we also only do that up until something is ready. So this is probably a performance win in the usual cases. Signed-off-by: Chris Lalancette <[email protected]>
- Loading branch information
1 parent
7609e41
commit 543738e
Showing
1 changed file
with
20 additions
and
73 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