sync: fix fuzz_oneshot test by using instrumented loom::sync::Arc (#1464)

Since `tokio_sync::oneshot` makes a `CausalCell::with_mut()` mutable
access in the `Inner::drop()`, we must use the instrumented
`loom::sync::Arc`.

Uncovered by carllerche/loom#42
This commit is contained in:
Philip Kannegaard Hayes 2019-08-17 21:30:31 -07:00 committed by Carl Lerche
parent c187cd75b6
commit 9f0daad5ac

View File

@ -1,6 +1,6 @@
//! A channel for sending a single message between asynchronous tasks.
use crate::loom::{sync::atomic::AtomicUsize, sync::CausalCell};
use crate::loom::sync::{atomic::AtomicUsize, Arc, CausalCell};
use futures_core::ready;
use std::fmt;
@ -8,7 +8,6 @@ use std::future::Future;
use std::mem::MaybeUninit;
use std::pin::Pin;
use std::sync::atomic::Ordering::{self, AcqRel, Acquire};
use std::sync::Arc;
use std::task::Poll::{Pending, Ready};
use std::task::{Context, Poll, Waker};