We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d904053 commit 17c68d1Copy full SHA for 17c68d1
std/src/sync/mpmc/list.rs
@@ -213,6 +213,11 @@ impl<T> Channel<T> {
213
.compare_exchange(block, new, Ordering::Release, Ordering::Relaxed)
214
.is_ok()
215
{
216
+ // This yield point leaves the channel in a half-initialized state where the
217
+ // tail.block pointer is set but the head.block is not. This is used to
218
+ // facilitate the test in src/tools/miri/tests/pass/issues/issue-139553.rs
219
+ #[cfg(miri)]
220
+ crate::thread::yield_now();
221
self.head.block.store(new, Ordering::Release);
222
block = new;
223
} else {
0 commit comments