38
38
html_logo_url = "https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png"
39
39
) ]
40
40
41
- use std:: collections:: HashMap ;
42
41
use std:: fmt;
43
42
use std:: marker:: PhantomData ;
44
43
use std:: panic:: { RefUnwindSafe , UnwindSafe } ;
@@ -48,6 +47,7 @@ use std::sync::{Arc, Mutex, RwLock, TryLockError};
48
47
use std:: task:: { Poll , Waker } ;
49
48
use std:: thread:: { self , ThreadId } ;
50
49
50
+ use ahash:: AHashMap ;
51
51
use async_task:: { Builder , Runnable } ;
52
52
use concurrent_queue:: ConcurrentQueue ;
53
53
use futures_lite:: { future, prelude:: * } ;
@@ -715,7 +715,7 @@ struct State {
715
715
/// Local queues created by runners.
716
716
///
717
717
/// These are keyed by the thread that the runner originated in.
718
- local_queues : RwLock < HashMap < ThreadId , Vec < Arc < LocalQueue > > > > ,
718
+ local_queues : RwLock < AHashMap < ThreadId , Vec < Arc < LocalQueue > > > > ,
719
719
720
720
/// Set to `true` when a sleeping ticker is notified or no tickers are sleeping.
721
721
notified : AtomicBool ,
@@ -732,7 +732,7 @@ impl State {
732
732
fn new ( ) -> State {
733
733
State {
734
734
queue : ConcurrentQueue :: unbounded ( ) ,
735
- local_queues : RwLock :: new ( HashMap :: new ( ) ) ,
735
+ local_queues : RwLock :: new ( AHashMap :: new ( ) ) ,
736
736
notified : AtomicBool :: new ( true ) ,
737
737
sleepers : Mutex :: new ( Sleepers {
738
738
count : 0 ,
@@ -1185,7 +1185,7 @@ fn debug_executor(executor: &Executor<'_>, name: &str, f: &mut fmt::Formatter<'_
1185
1185
}
1186
1186
1187
1187
/// Debug wrapper for the local runners.
1188
- struct LocalRunners < ' a > ( & ' a RwLock < HashMap < ThreadId , Vec < Arc < LocalQueue > > > > ) ;
1188
+ struct LocalRunners < ' a > ( & ' a RwLock < AHashMap < ThreadId , Vec < Arc < LocalQueue > > > > ) ;
1189
1189
1190
1190
impl fmt:: Debug for LocalRunners < ' _ > {
1191
1191
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
0 commit comments