File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ tokio03 = ["tokio03-crate"]
21
21
22
22
[dependencies ]
23
23
async-channel = " ^2.1.1"
24
- async-executor = " ^1.8 "
24
+ async-executor = { version = " ^1.12 " , features = [ " static " ] }
25
25
async-lock = " ^3.2"
26
26
blocking = " ^1.5"
27
27
futures-lite = " ^2.0"
Original file line number Diff line number Diff line change 1
1
use crate :: Task ;
2
- use async_executor:: { Executor , LocalExecutor } ;
2
+ use async_executor:: { LocalExecutor , StaticExecutor } ;
3
3
use std:: future:: Future ;
4
4
5
- pub ( crate ) static GLOBAL_EXECUTOR : Executor < ' _ > = Executor :: new ( ) ;
5
+ pub ( crate ) static GLOBAL_EXECUTOR : StaticExecutor = StaticExecutor :: new ( ) ;
6
6
7
7
thread_local ! {
8
- pub ( crate ) static LOCAL_EXECUTOR : LocalExecutor <' static > = LocalExecutor :: new( ) ;
8
+ pub ( crate ) static LOCAL_EXECUTOR : LocalExecutor <' static > = const { LocalExecutor :: new( ) } ;
9
9
}
10
10
11
11
/// Runs the global and the local executor on the current thread
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ static GLOBAL_EXECUTOR_EXPECTED_THREADS_NUMBER: Mutex<usize> = Mutex::new(0);
13
13
thread_local ! {
14
14
// Used to shutdown a thread when we receive a message from the Sender.
15
15
// We send an ack using to the Receiver once we're finished shutting down.
16
- static THREAD_SHUTDOWN : OnceCell <( Sender <( ) >, Receiver <( ) >) > = OnceCell :: new( ) ;
16
+ static THREAD_SHUTDOWN : OnceCell <( Sender <( ) >, Receiver <( ) >) > = const { OnceCell :: new( ) } ;
17
17
}
18
18
19
19
/// Spawn more executor threads, up to configured max value.
You can’t perform that action at this time.
0 commit comments