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
1 changed files with 5 additions and 0 deletions
|
@ -188,6 +188,11 @@ impl LocalWaker {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<LocalWaker> for Waker {
|
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]
|
#[inline]
|
||||||
fn from(local_waker: LocalWaker) -> Self {
|
fn from(local_waker: LocalWaker) -> Self {
|
||||||
local_waker.0
|
local_waker.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue