From 3d808d52dec3db864532403f980a38ff98e3af8a Mon Sep 17 00:00:00 2001 From: Roland Kuhn Date: Wed, 4 May 2022 10:58:23 +0200 Subject: [PATCH] add caveat discussed in #74335 --- library/core/src/task/wake.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs index 301cfacb554..9e74bcc541e 100644 --- a/library/core/src/task/wake.rs +++ b/library/core/src/task/wake.rs @@ -228,6 +228,10 @@ impl Waker { /// /// Note that the above implies that multiple wake-ups may be coalesced into a /// single `poll` invocation by the runtime. + /// + /// Also note that yielding to competing tasks is not guaranteed: it is the + /// executor’s choice which task to run and the executor may choose to run the + /// current task again. #[inline] #[stable(feature = "futures_api", since = "1.36.0")] pub fn wake(self) {