Skip to content

Commit a78ee85

Browse files
committed
Updated unit tests
1 parent 59fdde4 commit a78ee85

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let executor = TickedAsyncExecutor::default();
1515

1616
executor.spawn_local("MyIdentifier", async move {}).detach();
1717

18-
// Make sure to tick your executor to run the tasks
18+
// Tick your executor to run the tasks
1919
assert_eq!(executor.num_tasks(), 1);
2020
executor.tick(DELTA, None);
2121
assert_eq!(executor.num_tasks(), 0);
@@ -48,11 +48,14 @@ const DELTA: f64 = 1000.0 / 60.0;
4848

4949
let executor = TickedAsyncExecutor::default();
5050

51-
executor.spawn_local("MyIdentifier", async move {}).detach();
51+
executor.spawn_local("MyIdentifier1", async move {}).detach();
52+
executor.spawn_local("MyIdentifier2", async move {}).detach();
5253

53-
// Runs upto 10 woken tasks per tick
54+
// Runs upto 1 woken tasks per tick
55+
assert_eq!(executor.num_tasks(), 2);
56+
executor.tick(DELTA, Some(1));
5457
assert_eq!(executor.num_tasks(), 1);
55-
executor.tick(DELTA, Some(10));
58+
executor.tick(DELTA, Some(1));
5659
assert_eq!(executor.num_tasks(), 0);
5760
```
5861

0 commit comments

Comments
 (0)