This commit is contained in:
azw 2024-05-12 09:49:25 +08:00
parent c950f6d288
commit 902db5e1bf
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,9 @@ pub struct ListHead<T> {
_self_wp: Weak::<RefCell::<Self>>,
}
unsafe impl<T> Send for ListHead<T> {}
unsafe impl<T> Sync for ListHead<T> {}
impl<T> ListHead<T> {
fn new(data: Weak::<RefCell::<T>>) -> Rc::<RefCell::<Self>> {

View File

@ -1,6 +1,7 @@
use std::rc::{Rc, Weak};
use std::cell::RefCell;
use std::sync::Mutex;
//use futures::lock::Mutex;
use std::sync::Arc;
use std::thread;
use std::thread::Thread;