-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix multiple enqueues skipping waitForWake
We renamed waitForWake to waitForNewOperationAndExecutionInterval to describe that it is doing two things. Fixed the logic where enqueuing two or more operations would skip our executionInterval logic. Added test coverage for this logic, as well as a 2nd test to ensure flush can still skip waiting for it. Lastly cleaned up the force state in the main processQueueForever loop, we were able to fully encapsulate it into waitForNewOperationAndExecutionInterval. The other part of the logic is once we start processing the queue we want to do so until it's empty again, which ops != null is the only checked needed in processQueueForever to cover that.
- Loading branch information
Showing
2 changed files
with
57 additions
and
11 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