File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ readme = "../README.md"
16
16
event-listener = " 2.0.0"
17
17
18
18
[dev-dependencies ]
19
+ async-io = " 1.1.2"
19
20
async-std = " 1.6.2"
20
21
futures = " 0.3.5"
21
22
futures-intrusive = " 0.3.1"
22
23
futures-lite = " 1.0.0"
23
- smol = " 0.1.18"
24
24
tokio = { version = " 0.2.21" , features = [" sync" , " parking_lot" ] }
Original file line number Diff line number Diff line change @@ -7,8 +7,9 @@ use std::sync::Arc;
7
7
use std:: thread;
8
8
use std:: time:: { Duration , Instant } ;
9
9
10
+ use async_io:: Timer ;
10
11
use async_mutex:: Mutex ;
11
- use smol :: Timer ;
12
+ use futures_lite :: future ;
12
13
13
14
fn main ( ) {
14
15
let num_threads = 30 ;
@@ -18,7 +19,7 @@ fn main() {
18
19
for i in 0 ..num_threads {
19
20
let hits = hits. clone ( ) ;
20
21
threads. push ( thread:: spawn ( move || {
21
- smol :: run ( async {
22
+ future :: block_on ( async {
22
23
let start = Instant :: now ( ) ;
23
24
24
25
while start. elapsed ( ) < Duration :: from_secs ( 1 ) {
You can’t perform that action at this time.
0 commit comments