Add Once::new as a way of constructing a Once
This commit is contained in:
@@ -73,9 +73,10 @@ use thread::{self, Thread};
|
|||||||
/// A synchronization primitive which can be used to run a one-time global
|
/// A synchronization primitive which can be used to run a one-time global
|
||||||
/// initialization. Useful for one-time initialization for FFI or related
|
/// initialization. Useful for one-time initialization for FFI or related
|
||||||
/// functionality. This type can only be constructed with the [`ONCE_INIT`]
|
/// functionality. This type can only be constructed with the [`ONCE_INIT`]
|
||||||
/// value.
|
/// value or the equivalent [`Once::new`] constructor.
|
||||||
///
|
///
|
||||||
/// [`ONCE_INIT`]: constant.ONCE_INIT.html
|
/// [`ONCE_INIT`]: constant.ONCE_INIT.html
|
||||||
|
/// [`Once::new`]: struct.Once.html#method.new
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user