forked from rayon-rs/rayon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make test 'iter_panic_fuse' deterministic
Fixes rayon-rs#667 'panic_fuse' will only stop other threads 'as soon as possible' - if the other threads are fast enough, they might end up processing the entire rest of the iterator. This commit changes the test 'iter_panic_fuse' to properly take this into account, by creating a custom threadpool with only 1 thread. This makes the test deterministic - with only one thread, the panic is guaranmteed to be observed when the next item is processed, causing the desired early exit.
- Loading branch information
Showing
1 changed file
with
27 additions
and
21 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