diff options
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/condvar.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/sys/common/condvar.rs b/src/libstd/sys/common/condvar.rs index 33734a88cf3..b6f29dd5fc3 100644 --- a/src/libstd/sys/common/condvar.rs +++ b/src/libstd/sys/common/condvar.rs @@ -27,6 +27,13 @@ impl Condvar { /// first used with any of the functions below. pub const fn new() -> Condvar { Condvar(imp::Condvar::new()) } + /// Prepares the condition variable for use. + /// + /// This should be called once the condition variable is at a stable memory + /// address. + #[inline] + pub unsafe fn init(&mut self) { self.0.init() } + /// Signals one waiter on this condition variable to wake up. #[inline] pub unsafe fn notify_one(&self) { self.0.notify_one() } |
