Skip to content

Commit 3d808d5

Browse files
authored
add caveat discussed in rust-lang#74335
1 parent 2946f7a commit 3d808d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/task/wake.rs

+4
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ impl Waker {
228228
///
229229
/// Note that the above implies that multiple wake-ups may be coalesced into a
230230
/// single `poll` invocation by the runtime.
231+
///
232+
/// Also note that yielding to competing tasks is not guaranteed: it is the
233+
/// executor’s choice which task to run and the executor may choose to run the
234+
/// current task again.
231235
#[inline]
232236
#[stable(feature = "futures_api", since = "1.36.0")]
233237
pub fn wake(self) {

0 commit comments

Comments
 (0)