diff options
| author | Son <leson.phung@gmail.com> | 2018-10-24 09:28:04 +1100 |
|---|---|---|
| committer | Son <leson.phung@gmail.com> | 2018-10-24 09:28:04 +1100 |
| commit | 35391326a6e59fb80f851a8345f577a2527eae3c (patch) | |
| tree | 404e2c1b635bc9d72ac919ec469699d5d78441f7 /src/libcore/task | |
| parent | a70ef6a20bbb9d2ac557e54acccb97e7662550ce (diff) | |
| download | rust-35391326a6e59fb80f851a8345f577a2527eae3c.tar.gz rust-35391326a6e59fb80f851a8345f577a2527eae3c.zip | |
Update comment based on suggestion.
Diffstat (limited to 'src/libcore/task')
| -rw-r--r-- | src/libcore/task/wake.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs index c2768e70aec..c9fb22e0080 100644 --- a/src/libcore/task/wake.rs +++ b/src/libcore/task/wake.rs @@ -190,8 +190,9 @@ impl LocalWaker { impl From<LocalWaker> for Waker { /// Converts a `LocalWaker` into a `Waker`. /// - /// This conversion forgets local waker and allocates a new waker with - /// the same inner. + /// 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 |
