]> git.lizzy.rs Git - rust.git/commit
Auto merge of #2197 - RalfJung:round-robin, r=RalfJung
authorbors <bors@rust-lang.org>
Sun, 5 Jun 2022 18:37:07 +0000 (18:37 +0000)
committerbors <bors@rust-lang.org>
Sun, 5 Jun 2022 18:37:07 +0000 (18:37 +0000)
commit2eae4746739d135039aee99071e0c6fcba5bfeee
tree97bcba9959c664c46da2e03b0303946a068375f1
parent0fbe710012e0b83142a5a5fc5704b97dcd295eec
parent34b359be1ec89383baff1dba5f74f5bfe8beedd7
Auto merge of #2197 - RalfJung:round-robin, r=RalfJung

make Miri's scheduler proper round-robin

When thread N blocks or yields, we activate thread N+1 next, rather than always activating thread 0. This should guarantee that as long as all threads regularly yield, each thread eventually takes a step again.

Fixes the "multiple loops that yield playing ping-pong" part of https://github.com/rust-lang/miri/issues/1388.
`@cbeuw` I hope this doesn't screw up the scheduler-dependent tests you are adding in your PR.