Skip to content

Commit 6f5f9bc

Browse files
committed
fix(runtime): use Arc<SendWrapper>
1 parent 6d8704c commit 6f5f9bc

File tree

1 file changed

+2
-4
lines changed
  • compio-runtime/src/runtime

1 file changed

+2
-4
lines changed

compio-runtime/src/runtime/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Default for FutureState {
4848

4949
pub(crate) struct RuntimeInner {
5050
driver: RefCell<Proactor>,
51-
local_runnables: SendWrapper<Arc<RefCell<VecDeque<Runnable>>>>,
51+
local_runnables: Arc<SendWrapper<RefCell<VecDeque<Runnable>>>>,
5252
sync_runnables: Arc<SegQueue<Runnable>>,
5353
op_runtime: RefCell<OpRuntime>,
5454
#[cfg(feature = "time")]
@@ -59,9 +59,7 @@ impl RuntimeInner {
5959
pub fn new(builder: &ProactorBuilder) -> io::Result<Self> {
6060
Ok(Self {
6161
driver: RefCell::new(builder.build()?),
62-
// Arc to send to another thread, but only in current thread will the inner be accessed.
63-
#[allow(clippy::arc_with_non_send_sync)]
64-
local_runnables: SendWrapper::new(Arc::new(RefCell::new(VecDeque::new()))),
62+
local_runnables: Arc::new(SendWrapper::new(RefCell::new(VecDeque::new()))),
6563
sync_runnables: Arc::new(SegQueue::new()),
6664
op_runtime: RefCell::default(),
6765
#[cfg(feature = "time")]

0 commit comments

Comments
 (0)