Skip to content

Commit 5a1f189

Browse files
committed
fixup! Add callbacks for when threads start and stop doing work
1 parent 38e0c87 commit 5a1f189

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rayon-core/src/sleep/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,12 @@ impl Sleep {
281281
// that whomever is coming to wake us will have to wait until we
282282
// release the mutex in the call to `wait`, so they will see this
283283
// boolean as true.)
284+
registry.release_thread();
284285
*is_blocked = true;
285286
while *is_blocked {
286287
is_blocked = sleep_state.condvar.wait(is_blocked).unwrap();
287288
}
289+
registry.acquire_thread();
288290
}
289291

290292
// Update other state:

0 commit comments

Comments
 (0)