wta-reactor

Crates.iowta-reactor
lib.rswta-reactor
version0.1.0
sourcesrc
created_at2022-05-09 08:28:52.604204
updated_at2022-05-09 08:28:52.604204
descriptionReactor for the what-the-async runtime
homepage
repositoryhttps://github.com/conradludgate/what-the-async
max_upload_size
id583091
size14,334
Conrad Ludgate (conradludgate)

documentation

README

Reactor

Reactors react to side effects in the tasks. These side effects could be running timers or listening to OS events.

Timers

The timers this reactor currently exposes are simple and naive. It stores all Instant + Waker pairs in a priority queue, the reactor book-keeping will run and attempts to wake any elapsed timers.

For a more complex and faster timer setup, take a look at https://tokio.rs/blog/2018-03-timers

OS Events

This reactor makes use of mio which was written for use in tokio, but was built into a separate crate. It allows for registering data sources for events, and then polling for those events.

We store use an async-channel per event source registration. Any events that are relevent are pushed to the channel. If an async-read/write future is called, it will retrieve those events from the channel and handle them accordingly.

Currently, the only implemented form of IO is TCP listeners and streams

Commit count: 11

cargo fmt