pub struct Unparker { /* fields omitted */ }
Unparks a thread parked by the associated Parker
.
Atomically makes the token available if it is not already.
This method will wake up the thread blocked on park
or park_timeout
, if there is
any.
use std::thread;
use std::time::Duration;
use crossbeam_utils::sync::Parker;
let mut p = Parker::new();
let u = p.unparker().clone();
thread::spawn(move || {
thread::sleep(Duration::from_millis(500));
u.unpark();
});
p.park();
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static