Skip to content

Commit 6fa666d

Browse files
committed
Update README.md
Added example
1 parent f342e3f commit 6fa666d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
Rust based Async Executor which executes woken tasks only when it is ticked
44

5+
# Example
6+
7+
```rust
8+
let executor = TickedAsyncExecutor::default();
9+
10+
executor.spawn_local("MyIdentifier", async move {}).detach();
11+
12+
// Make sure to tick your executor to run the tasks
13+
executor.tick(DELTA, LIMIT);
14+
```
15+
516
# Limitation
617

718
- Does not work with the tokio runtime and async constructs that use the tokio runtime internally

0 commit comments

Comments
 (0)