Skip to content

Commit ba3c245

Browse files
authored
Rollup merge of #74598 - mzohreva:mz/fix-test, r=KodrAus
Fix sync_once_cell_does_not_leak_partially_constructed_boxes Spinning multiple threads in this test causes a deadlock in SGX where thread scheduling is not preemptive. cc @jethrogb @AdrianCX
2 parents 1361b02 + 141adeb commit ba3c245

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/libstd/lazy.rs

+2
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,8 @@ mod tests {
827827
tx.send(msg).unwrap();
828828
break;
829829
}
830+
#[cfg(target_env = "sgx")]
831+
crate::thread::yield_now();
830832
}
831833
});
832834
}

0 commit comments

Comments
 (0)