We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bdcebb commit b1174a4Copy full SHA for b1174a4
rayon-core/src/sleep/mod.rs
@@ -423,6 +423,10 @@ impl Sleep {
423
let mut is_blocked = sleep_state.is_blocked.lock().unwrap();
424
if *is_blocked {
425
*is_blocked = false;
426
+
427
+ // Increment the number of active threads
428
+ self.data.lock().unwrap().active_threads += 1;
429
430
sleep_state.condvar.notify_one();
431
432
// When the thread went to sleep, it will have incremented
@@ -436,9 +440,6 @@ impl Sleep {
436
440
// do.
437
441
self.counters.sub_sleeping_thread();
438
442
439
- // Increment the number of active threads
- self.data.lock().unwrap().active_threads += 1;
-
443
self.logger.log(|| ThreadNotify { worker: index });
444
445
true
0 commit comments