embassy-executor

Crates

git

Versions

std

Flavors

embassy_executor::raw

Function task_from_waker

Source
pub fn task_from_waker(waker: &Waker) -> TaskRef
Expand description

Get a task pointer from a waker.

This can be used as an optimization in wait queues to store task pointers (1 word) instead of full Wakers (2 words). This saves a bit of RAM and helps avoid dynamic dispatch.

You can use the returned task pointer to wake the task with wake_task.

ยงPanics

Panics if the waker is not created by the Embassy executor.