(&self)
| 25 | |
| 26 | impl ContextInner { |
| 27 | pub fn close(&self) { |
| 28 | if self |
| 29 | .is_closed |
| 30 | .compare_exchange(false, true, Ordering::Release, Ordering::Relaxed) |
| 31 | .is_ok() |
| 32 | { |
| 33 | self.lock_ops.notify(usize::MAX); |
| 34 | } |
| 35 | } |
| 36 | pub fn is_closed(&self) -> bool { |
| 37 | self.is_closed.load(Ordering::Relaxed) |
| 38 | } |