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
This commit is contained in:
Yuki Okushi 2020-07-27 19:31:55 +09:00 committed by GitHub
commit ba3c245227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -827,6 +827,8 @@ mod tests {
tx.send(msg).unwrap();
break;
}
#[cfg(target_env = "sgx")]
crate::thread::yield_now();
}
});
}