3838 html_logo_url = "https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png"
3939) ]
4040
41- use std:: collections:: HashMap ;
4241use std:: fmt;
4342use std:: marker:: PhantomData ;
4443use std:: panic:: { RefUnwindSafe , UnwindSafe } ;
@@ -48,6 +47,7 @@ use std::sync::{Arc, Mutex, RwLock, TryLockError};
4847use std:: task:: { Poll , Waker } ;
4948use std:: thread:: { self , ThreadId } ;
5049
50+ use ahash:: AHashMap ;
5151use async_task:: { Builder , Runnable } ;
5252use concurrent_queue:: ConcurrentQueue ;
5353use futures_lite:: { future, prelude:: * } ;
@@ -715,7 +715,7 @@ struct State {
715715 /// Local queues created by runners.
716716 ///
717717 /// 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 > > > > ,
719719
720720 /// Set to `true` when a sleeping ticker is notified or no tickers are sleeping.
721721 notified : AtomicBool ,
@@ -732,7 +732,7 @@ impl State {
732732 fn new ( ) -> State {
733733 State {
734734 queue : ConcurrentQueue :: unbounded ( ) ,
735- local_queues : RwLock :: new ( HashMap :: new ( ) ) ,
735+ local_queues : RwLock :: new ( AHashMap :: new ( ) ) ,
736736 notified : AtomicBool :: new ( true ) ,
737737 sleepers : Mutex :: new ( Sleepers {
738738 count : 0 ,
@@ -1185,7 +1185,7 @@ fn debug_executor(executor: &Executor<'_>, name: &str, f: &mut fmt::Formatter<'_
11851185 }
11861186
11871187 /// 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 > > > > ) ;
11891189
11901190 impl fmt:: Debug for LocalRunners < ' _ > {
11911191 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
0 commit comments