Change driver thread store into compare/exchange
Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
parent
f6dac9af91
commit
9bce9de45b
|
@ -158,7 +158,9 @@ impl Reaper {
|
|||
#[cold]
|
||||
fn start_driver_thread(&'static self) {
|
||||
#[cfg(test)]
|
||||
DRIVER_THREAD_SPAWNED.store(true, Ordering::SeqCst);
|
||||
DRIVER_THREAD_SPAWNED
|
||||
.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst)
|
||||
.unwrap_or_else(|_| unreachable!("Driver thread already spawned"));
|
||||
|
||||
thread::Builder::new()
|
||||
.name("async-process".to_string())
|
||||
|
|
Loading…
Reference in New Issue