Skip to content

Commit

Permalink
TMP, for test. Revert "Don't use thread::sleep in tests on SGX"
Browse files Browse the repository at this point in the history
This reverts commit 5c2e1d5.
  • Loading branch information
faern committed Mar 19, 2019
1 parent 8266a02 commit d14461d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,15 +533,7 @@ mod tests {
thread::spawn(move || {
let _lock = arc2.write();
});

if cfg!(not(all(target_env = "sgx", target_vendor = "fortanix"))) {
thread::sleep(Duration::from_millis(100));
} else {
// FIXME: https://github.com/fortanix/rust-sgx/issues/31
for _ in 0..100 {
thread::yield_now();
}
}
thread::sleep(Duration::from_millis(100));

// A normal read would block here since there is a pending writer
let _lock2 = arc.read_recursive();
Expand Down

0 comments on commit d14461d

Please sign in to comment.