Waking, pushing futures to a polling queue

Question

How can a waker have its future “polled”?

Answer

A waker calls specific “waking” code when the waker is notified that its data is ready. The “waking” code locates the future that the waker associates to, and pushes the future to a “polling queue”. A waker’s job is finished after “waking”.

With a “polling queue”, wakers are decoupled from “external code” which pops futures from the queue, polls the futures and dispatches data.

Diagram: a waker wakes.