wta-executor 0.1.0

Executor for the what-the-async runtime
Documentation
  • Coverage
  • 11.11%
    1 out of 9 items documented0 out of 7 items with examples
  • Size
  • Source code size: 5.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 632.43 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • conradludgate/what-the-async
    79 5 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • conradludgate

Executor

This is a simple executor. There is a single Arc<Executor> type that can be shared between many worker threads.

Each worker will continuously run executor.poll_once() which will

  1. Pop a task from the shared task queue
    • Parking the thread if no tasks are available
  2. Poll that task

The task will be polled with a context that will reference that task (using a Mutex<Option<Task>>), and a copy of the executor.

Calling wake on this context will then call executor.wake(task). If there are threads sleeping, one will be woken up.