Skip to content

Commit

Permalink
Only panic in park when debug_assertions are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Mar 20, 2019
1 parent 9050a28 commit 3996e3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/thread_parker/sgx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ impl ThreadParker {
#[inline]
pub fn park(&self) {
while self.parked.load(Ordering::Acquire) {
let res = usercalls::wait(EV_UNPARK, WAIT_INDEFINITE).expect("wait returned error");
assert_eq!(res & EV_UNPARK, EV_UNPARK);
let result = usercalls::wait(EV_UNPARK, WAIT_INDEFINITE);
debug_assert_eq!(result.expect("wait returned error") & EV_UNPARK, EV_UNPARK);
}
}

Expand Down

0 comments on commit 3996e3e

Please sign in to comment.