mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
63226e2b80
warning: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> virtio-devices/src/vsock/device.rs:376:22 | 376 | backend: Arc::new(RwLock::new(backend)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default The vsock backend may be shared between threads, so the type `B` in `Vsock` should be `VsockBackend` and `Sync`. Considering that `api_receiver` and `gdb_receiver` are only used in vmm threads, the `Arc` can be replaced by `Rc`. Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |