Lines Matching refs:guard
16 …wLock的数据结构进行访问和修改. 每个要访问共享数据的会获得一个守卫(guard), 只读进程获得READER(读者守卫),需要修改共享变量的进程获得WRITER(写者守卫),作为RwLock…
132 let guard = LOCK.read();
133 let value = *guard;
143 let guard = LOCK.read();
144 let value = *guard;
154 let mut guard = LOCK.write();
155 *guard += 100;
159 "Writers: the value is {guard}
161 guard = *guard
163 let read_guard=guard.downgrade();
169 let guard = LOCK.upgradeable_read();
170 let value = *guard;
177 let mut upgraded_guard = guard.upgrade();