pub fn yield_blocking() -> bool
Expand description
Call the yield
canonical built-in function.
This yields control to the host temporarily, allowing other tasks to make progress. It’s a good idea to call this inside a busy loop which does not otherwise ever yield control the host.
Note that this function is a blocking function, not an async
function.
That means that this is not an async yield which allows other tasks in this
component to progress, but instead this will block the current function
until the host gets back around to returning from this yield. Asynchronous
functions should probably use yield_async
instead.
§Return Value
This function returns a bool
which indicates whether execution should
continue after this yield point. A return value of true
means that the
task was not cancelled and execution should continue. A return value of
false
, however, means that the task was cancelled while it was suspended
at this yield point. The caller should return back and exit from the task
ASAP in this situation.