File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ readme = "../README.md"
1616event-listener = " 2.0.0"
1717
1818[dev-dependencies ]
19+ async-io = " 1.1.2"
1920async-std = " 1.6.2"
2021futures = " 0.3.5"
2122futures-intrusive = " 0.3.1"
2223futures-lite = " 1.0.0"
23- smol = " 0.1.18"
2424tokio = { 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;
77use std:: thread;
88use std:: time:: { Duration , Instant } ;
99
10+ use async_io:: Timer ;
1011use async_mutex:: Mutex ;
11- use smol :: Timer ;
12+ use futures_lite :: future ;
1213
1314fn main ( ) {
1415 let num_threads = 30 ;
@@ -18,7 +19,7 @@ fn main() {
1819 for i in 0 ..num_threads {
1920 let hits = hits. clone ( ) ;
2021 threads. push ( thread:: spawn ( move || {
21- smol :: run ( async {
22+ future :: block_on ( async {
2223 let start = Instant :: now ( ) ;
2324
2425 while start. elapsed ( ) < Duration :: from_secs ( 1 ) {
You can’t perform that action at this time.
0 commit comments