Status: experimental.
See crate docs for details
You can use this crate to create a deadline received through a StopToken
:
```rust use asyncstd::prelude::*; use stoptoken::prelude::*; use stop_token::StopToken;
struct Event;
async fn dowork(work: impl Stream
async fn processevent(event: Event) { } ```
Or Duration
or Instant
to create a time
-based deadline:
```rust use std::time::Instant; use asyncstd::prelude::*; use stoptoken::prelude::*; use stop_token::StopToken;
struct Event;
async fn dowork(work: impl Stream
async fn processevent(event: Event) { } ```