-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: hard to test run_cooperative execution
This is because it relies on a scheduler outside of our domain (JavaScript) Solution: allow to run a callback after the queue is exhausted This changes `single_threaded::run_cooperatively` type signature a bit, adding an extra parameter. This can be alternatively done by something like `join_all` for all futures representing tasks scheduled and spawning another task to do something after they've been joined, but it seems at the time that adding this callback has lower impact / easier ergonomics (but, of course, it's less "pure" if you may)
- Loading branch information
Showing
2 changed files
with
59 additions
and
3 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