Searched refs:RwLock (Results 1 – 3 of 3) sorted by relevance
1 # RwLock读写锁16 …的一致性. 数据会被包裹在一个RwLock的数据结构中, 一切的访问必须通过RwLock的数据结构进行访问和修改. 每个要访问共享数据的会获得一个守卫(guard), 只读进程获得READER(读…27 #### 2.3.1 RwLock数据结构29 pub struct RwLock<T> {46 inner: &'a RwLock<T>,54 inner: &'a RwLock<T>,58 #### 2.3.5 RwLock的lock的结构介绍79 ### 3.1 RwLock的主要API81 ///功能: 输入需要保护的数据类型data,返回一个新的RwLock类型.129 static LOCK: RwLock<u32> = RwLock::new(100 as u32);
32 pub struct RwLock<T> { struct50 inner: &'a RwLock<T>, argument58 inner: &'a RwLock<T>,61 unsafe impl<T: Send> Send for RwLock<T> {} implementation62 unsafe impl<T: Send + Sync> Sync for RwLock<T> {} implementation65 impl<T> RwLock<T> { impl69 return RwLock { in new()79 let RwLock { data, .. } = self; in into_inner() localVariable247 impl<T: Default> Default for RwLock<T> { implementation254 impl<T> From<T> for RwLock<T> { implementation[all …]
44 - RwLock: new: 新增了rust实现的读写锁 (#186)