local-event 0.1.1

Single-threaded version of `event_listener`
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented5 out of 8 items with examples
  • Size
  • Source code size: 14.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.75 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • George-Miao/local-event
    3 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • George-Miao

Local event

A single-threaded (unsync) version of event-listener.

Get started

Add the crate

cargo add local-event

then

use local_event::Event;

let event = Event::new();
let listener = event.listen();

// Task 1
event.notify(1);

// Task 2
listener.await;
// Do something after the event is received