remote_waker 1.0.0

A library to wake tasks remotely
Documentation
  • Coverage
  • 0%
    0 out of 9 items documented0 out of 7 items with examples
  • Size
  • Source code size: 3.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.78 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • megahomyak

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.