Rollup merge of #53507 - phungleson:fix-impl-from-for-waker, r=cramertj
Add doc for impl From for Waker As part of issue #51430 (cc @skade). The impl is very simple, so not sure if we need to go into any details.
This commit is contained in:
commit
18f7d41a65
@ -188,6 +188,11 @@ impl LocalWaker {
|
||||
}
|
||||
|
||||
impl From<LocalWaker> for Waker {
|
||||
/// Converts a `LocalWaker` into a `Waker`.
|
||||
///
|
||||
/// This conversion turns a `!Sync` `LocalWaker` into a `Sync` `Waker`, allowing a wakeup
|
||||
/// object to be sent to another thread, but giving up its ability to do specialized
|
||||
/// thread-local wakeup behavior.
|
||||
#[inline]
|
||||
fn from(local_waker: LocalWaker) -> Self {
|
||||
local_waker.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user