3939) ]
4040#![ cfg_attr( docsrs, feature( doc_auto_cfg) ) ]
4141
42- use std:: collections:: HashMap ;
4342use std:: fmt;
4443use std:: marker:: PhantomData ;
4544use std:: panic:: { RefUnwindSafe , UnwindSafe } ;
@@ -49,6 +48,7 @@ use std::sync::{Arc, Mutex, RwLock, TryLockError};
4948use std:: task:: { Poll , Waker } ;
5049use std:: thread:: { self , ThreadId } ;
5150
51+ use ahash:: AHashMap ;
5252use async_task:: { Builder , Runnable } ;
5353use concurrent_queue:: ConcurrentQueue ;
5454use futures_lite:: { future, prelude:: * } ;
@@ -693,7 +693,7 @@ struct State {
693693 /// Local queues created by runners.
694694 ///
695695 /// These are keyed by the thread that the runner originated in.
696- local_queues : RwLock < HashMap < ThreadId , Vec < Arc < LocalQueue > > > > ,
696+ local_queues : RwLock < AHashMap < ThreadId , Vec < Arc < LocalQueue > > > > ,
697697
698698 /// Set to `true` when a sleeping ticker is notified or no tickers are sleeping.
699699 notified : AtomicBool ,
@@ -710,7 +710,7 @@ impl State {
710710 const fn new ( ) -> State {
711711 State {
712712 queue : ConcurrentQueue :: unbounded ( ) ,
713- local_queues : RwLock :: new ( HashMap :: new ( ) ) ,
713+ local_queues : RwLock :: new ( AHashMap :: new ( ) ) ,
714714 notified : AtomicBool :: new ( true ) ,
715715 sleepers : Mutex :: new ( Sleepers {
716716 count : 0 ,
@@ -1207,7 +1207,7 @@ fn debug_state(state: &State, name: &str, f: &mut fmt::Formatter<'_>) -> fmt::Re
12071207 }
12081208
12091209 /// Debug wrapper for the local runners.
1210- struct LocalRunners < ' a > ( & ' a RwLock < HashMap < ThreadId , Vec < Arc < LocalQueue > > > > ) ;
1210+ struct LocalRunners < ' a > ( & ' a RwLock < AHashMap < ThreadId , Vec < Arc < LocalQueue > > > > ) ;
12111211
12121212 impl fmt:: Debug for LocalRunners < ' _ > {
12131213 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
0 commit comments