#waker #task #wake #remote #remotely #snoozer #snoozing

remote_waker

A library to wake tasks remotely

1 stable release

1.0.0 May 19, 2023

#4 in #remotely

MIT license

4KB
67 lines

Available on crates.io!

Remote waker

This thing allows to wake a remote task. That's it. Helps, for example, when one task is pulling something from a mutexed queue and another task is putting something into the same queue. By utilizing the remote waker in such case, we can wake the first task only when the second task puts an item into the queue, which improves performance.

Usage

Use a new function to get a Waker and a Snoozer, give the Waker to the waking task and the snoozer to the snoozing task. When applying to the example above, we'll need to give the Waker to the pushing task and the Snoozer to the pulling task.

No runtime deps