about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/task/wake.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs
index ab4ae50c443..c9fb22e0080 100644
--- a/src/libcore/task/wake.rs
+++ b/src/libcore/task/wake.rs
@@ -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