Files
boc/rust-service/target/debug/deps/libparking_lot-5fc2c3fdec45feed.rmeta
T

748 lines
148 KiB
Plaintext
Raw Normal View History

rust
_L#rustc 1.96.0 (ac68faa20 2026-05-25)ÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Ácfg_ifÁÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0Álock_apiÁEcÓŽ/ÅS}sw‡A$P-0e8055cd433fa267Á
scopeguardÁ’‰‘p ÒÞa¢ßöéqÓB-29f0bdb2ea82739eÁparking_lot_coreÁªôqu´<Üb3 Èn~É-385dbf21a0d1611bÁsmallvecÁØNôCt€ïAGV­Â–-97fd81655f68edefÁ®f©¾/ô)c§{õa“â‘-a3906971a93fd1b8Á?A©ú¡E2¯ëäu-8e0657b9e365f274ÁtestsÁ,•Ÿ$ŠŸwebkit_queue_testÁŒñô$æôPå ,"$÷!\å ,¸%$­%hå ,ÜT$ÑTßå ,úõå ,Æ,$»,deadlockÁD¡»deadlock_detectionÁôøcheck_deadlockÁtÒ»š ôå ,ì  GuardMarkerÁ\ »
send_guardÁ´ï
ArcMutexGuardÁlõ»arc_lockÁ¤ÀArcReentrantMutexGuardÁ´„»³ ,.ArcRwLockReadGuardÁ”œ»³ RTArcRwLockUpgradableReadGuardÁä°»³ ArcRwLockWriteGuardÁœÒ»³ ©«ÀcondvarÁ 
  
 timed_outÁCondvarÁº!æ !
notify_oneÁ!notify_one_slowÁ$ $ !
notify_allÁ!notify_all_slowÁ( ( !waitÁ+¥!
wait_untilÁ-¥!wait_until_internalÁ/ / / !wait_forÁ3¥!wait_while_until_internalÁ5¥5!
wait_whileÁ8¥8!wait_while_untilÁ;¥;!wait_while_forÁ>¥>A>C×elisionÁEEAtomicElisionExtÁGIntTypeÁG elision_compare_exchange_acquireÁGelision_fetch_sub_releaseÁE have_elisionÁEL¹LÇLî
fair_mutexÁPP FairMutexÁR¥Pconst_fair_mutexÁT¥PFairMutexGuardÁV'aÁV¥PMappedFairMutexGuardÁYY¥mutexÁ\\¤^¥\ const_mutexÁ`¥\¥bb¥\MappedMutexGuardÁee¥onceÁhhhhhhhhhh h
h h hDONE_BITÁh
POISON_BITÁh
LOCKED_BITÁh
PARKED_BITÁhzpoisonedÁzdoneÁhOnceÁ}
}ˆhæ ºÓƒƒ call_once_forceÁ call_once_slowÁ   
PanicGuardÁ
ˆãh>h×raw_fair_mutexÁ˜˜˜ RawFairMutexÁ
ˆ˜žINITÁžï žlockÁžtry_lockÁžunlockÁž is_lockedÁ˜¥ unlock_fairÁ¥bumpÁ˜¨DurationÁ¨InstantÁ¨try_lock_untilÁ¨ try_lock_forÁ raw_mutexÁ­­­­­­­­­­ ­
­ ­ ­
­­­­ TOKEN_NORMALÁ­
TOKEN_HANDOFFÁ­¢­³­RawMutexÁú­ÅƒÅï ÅţųÅÁ­Ì×Ìê­ÏûÏϚϰ­Ômark_parked_if_lockedÁÔ mark_parkedÁÔ lock_slowÁ× × × Ô unlock_slowÁÛ Ô bump_slowÁ
raw_rwlockÁÞÞÞÞÞÞÞÞÞÞ Þ
Þ Þ Þ
ÞÞÞÞÞÞÞÞÞÞÞÞÞÞ³ÞWRITER_PARKED_BITÁÞUPGRADABLE_BITÁÞ
WRITER_BITÁÞ READERS_MASKÁÞ
ONE_READERÁÞ TOKEN_SHAREDÁÞTOKEN_EXCLUSIVEÁÞTOKEN_UPGRADABLEÁÞ RawRwLockÁƒºÞƒï lock_exclusiveÁtry_lock_exclusiveÁunlock_exclusiveÁ lock_sharedÁtry_lock_sharedÁ
unlock_sharedÁÁis_locked_exclusiveÁÞunlock_shared_fairÁunlock_exclusive_fairÁ bump_sharedÁbump_exclusiveÁÞ downgradeÁÞûtry_lock_shared_forÁtry_lock_shared_untilÁtry_lock_exclusive_forÁtry_lock_exclusive_untilÁÞžlock_shared_recursiveÁžtry_lock_shared_recursiveÁÞ¡try_lock_shared_recursive_forÁ¡try_lock_shared_recursive_untilÁÞ¤lock_upgradableÁ¤try_lock_upgradableÁ¤unlock_upgradableÁ¤upgradeÁ¤ try_upgradeÁÞªunlock_upgradable_fairÁªbump_upgradableÁÞ­downgrade_upgradableÁ­downgrade_to_upgradableÁÞ °try_lock_upgradable_untilÁ°try_lock_upgradable_forÁ°try_upgrade_untilÁ°try_upgrade_forÁÞ
µtry_lock_shared_fastÁµtry_lock_shared_slowÁµtry_lock_upgradable_fastÁµtry_lock_upgradable_slowÁµlock_exclusive_slowÁº µunlock_exclusive_slowÁ¼ µlock_shared_slowÁ¾ µunlock_shared_slowÁÀ µlock_upgradable_slowÁ µunlock_upgradable_slowÁÄ µtry_upgrade_slowÁµ upgrade_slowÁµdowngrade_slowÁÈ µdowngrade_to_upgradable_slowÁÊ µbump_shared_slowÁµbump_exclusive_slowÁµbump_upgradable_slowÁµwake_parked_threadsÁÏ/impl FnOnce(usize, UnparkResult) -> UnparkTokenÁÏ Ï µwait_for_readersÁÓ Ó Ó Ó µ lock_commonÁØimpl FnMut(&mut usize) -> boolÁØ Ø Ø µdeadlock_acquireÁµdeadlock_releaseÁremutexÁßßßßßß RawThreadIdÁå
ßçƒçnonzero_thread_idÁé ßReentrantMutexÁë¥ßconst_reentrant_mutexÁí¥ßReentrantMutexGuardÁïï¥ßMappedReentrantMutexGuardÁòò¥rwlockÁõõÒ÷¥õ const_rwlockÁù¥õÓûû¥õÔþþ¥õMappedRwLockReadGuardÁ¥õMappedRwLockWriteGuardÁ¥õRwLockUpgradableReadGuardÁ¥utilÁŠŠŠŠUncheckedOptionExtÁŽ¥Žunchecked_unwrapÁŠ¥Á2ŠŠ to_deadlineÁ ï  
  
 !"WaitTimeoutResultÁ½
½ˆÀ×ÃÅÖ 
Ƀh OnceStateÁËNewÁÌ
ËPoisonedÁÎ
Ë
InProgressÁÐ
ËDoneÁÒ
hhhÖƒhØÖhh Ûh
Ý×éKEYÁß__rust_std_internal_init_fnÁß á â__RUST_STD_INTERNAL_VALÁá äà6#
$
'
(
+
+
+
-
-
-
/
/
3
3
3
5
5
5
5
8
8
8
8
;
;
;
;
>
>
>
>
D
D
D
I
J
N
O

ƒ







¡
¢
£
¤
¦
§
«
¬
È
É
Ê
Ë
Í
Î
Ò
Ó
Õ
Ö
×
Û
Ý
ˆ

Š

Œ

Ž






š

œ

Ÿ
 
¢
£
¥
¦
§
¨
©
«
¬
®
¯
±
²
³
´

·
¸
¹
º
º
¼
¾
¾
À
Â
Â
Ä
Æ
Ç
È
Ê
Ì
Í
Î
Ï
Ó
Ø
Ø
Ý
Þ
é
Á
Á
Á
Ä
Ä
Æ
Ê
×
Ù
Ü
Ü
Þ
Þ
Þ
¿c½½¾­4¿ˆ ~Eå>I§ðÐì´=µß´=´=´=Š ´=Û´=Ø´=³ º*¦P/1i>I¿c­>G¤]¤]V¦]Á‚]üß3ø¤”&Š ËÌÍŸ5Îϯ5ÐÑÄ5ÒÓÛ5÷>ˆ¯Z™´OÛž?Øž?ž?Ðìž?µßž?ž?¿cž?Œ"Žëˆh OAýÇe‡—÷³}}~âˆh bÚè=UE¿cú@œÝˆ˜ AƒÍu?r|Š·A·AÃÃâĺ­ŽË…͘s»ØBBñ ºÞK/n/Ê¡#ÎÈBÓÈBÕÈBÜÈBßÈBâÈBèÈBëÈBîÈBÞååæ©. ¥Vùtß6PŽÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¥ÉDÀ½CÝ˽ÚËýÛËŽØËǽÔËȽÕËɽÖËA}L¤]‘žÅÃ¥ÌèÏÞƒ¡ƒ¤ƒªƒ­ƒ°ƒçåÛ¼¿cÐìµßŠ ÛØ³G Œ"ÃÎÓÕÜßâèëîÞŽü

²B*7
>t
Ò]BN_ »ü€G  ÆÍ"üØu­>¤]¤]V¦]Á‚]üß3ø¤”& Bà±IÞT½üüE

¤ü
6·AÉDü‘*·A·AKA ÀÃü½T""¤%@ &dataÁ 5á»I'yÆD·AÉDÉDÞÉDÔ¹|·A·AüÖ=

„Ö
6BÉDüç&BBKA ü u`""¤%@ &ïI 5á»I'yÆDBÉDÉD¼ÉDϹw±BBÒMÒMÒM„Ÿ

„Á ­ÒM 7´š } ¯üõAú@$‹¤]¤]V¦]Á‚]üß3ø¤”&ÒM®Küª4 ü·&BBü—HŸ·A%<BBt„   ”?ü×< ¿š UnparkTokenÁˆ ªÊôMvâD \  É ”?ü= ÀõP %ÒM0b01ÁÒM0b10Á„È 
 ŸN Ö ÒM 3ü®1 Ã Þ ü—I ÆB O},”?0b0001Á”?0b0010Á”?0b0100Á”?0b1000Á

”?üÅ$
þ”?
%”?0b10000Á¬œ
§
ÿ”?üü6
§§¨ ParkTokenÁ©ˆ (FáÎb)ÂL
Znÿ”?¬Ö
§
ý”?ü³9
úU
%9ý”?Ü›

T
ÿ”?
ü”?ü‘&
§ 
üíK
úUL…
”?s,mÿ”?jü”?œŽ

„Ž

ŒÄ Ÿ
”?>üó5
ƒ §
üÛN
ÈB
ç>ˆ, åüÃ&è×C% RawThreadIdÁùO·e

éO·e
¾ÒMùOÕúeáÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÒM ÒM•[±ßùNfaß®®£°innerÁ¨it§ÅLS¶ÒMáN¢fa] á•[•[ùOðe
éOðe
ÐÒM/5ùO¦®e  âš[­\/•[ O¿eùOíÔeùO‚!­e  ä¡^¤^³^#•[ O!eM OÀ$eùOÛôeá•[â¡^¤^³^åä¡^¤^³^ŸSôüë
 Ìë
 B×CÉDüŽ&BBü¾,ß×C×CdZ ýü¢Þíì.@ËŒïIËë<×ù„òä€B×CÉDŒÓÉDÈÉDó¹ÐBBÊß×C×Cß ü£ @

Σ 
ÈBÉDüµ (ÄÈBÈBMC â å üëzùóóÒö@»÷ïI»$ÌÏ–)Ú>³ÈBÉDL“ ÉDˆ ÉDع~¹ÄÈBÈBäÝ ½¾%´=06=|— }~#ú@.O5<¬¤H Ž'Žëˆh OAýÇe‡—÷b ú@ls¼½ œ%·A0B7>EP\h˜­ÞßõŠšÀ<—
œ­4Œ 
½æ„Ï
 TŸÏ
R 
V¡©¤ü
Y¢ð  `¤ž„¶ e¥¤ ^¦¥ b§â }©Ž5L÷ ËªÝ «â ì± Lì ƒ­Š/¬”
 í¯Ú/Ì«
ò°©.\Æ
屩.æ±ì.tÓ
벯/œç
ï³­0d› ùµù0¬©¦1´À·Ò÷¸Óû¹Ô1ÌõºÔþ»Ä¼üÍœüÍMJ This library provides implementations of `Mutex`, `RwLock`, `Condvar` andÁü›LI `Once` that are smaller, faster and more flexible than those in the RustÁüè?< standard library. It also provides a `ReentrantMutex` type.ÁEP\h˜­ÞßõŠšÀ#$œ­4#½æ" TŸÏ!R  V¡©Y¢ð `¤že¥¤^¦¥b§â}©Ž5˪ݫâì± ƒ­Š/ í¯Ú/ò°©.屩.$æ±ì.벯/ï³­0 ùµù0¦1·Ò÷¸Ó
û¹Ô1 ºÔ þ»Ä
¼½¾¥bâD‚ý À©d› ¿ 
„2$ÀŠ ×× `
µ Ü AtomicPtrÁLô¯]®Dÿ¼À RawMutex_ÁL§¨
ParkResultÁTÏË RequeueOpÁLÛñ UnparkResultÁdæÞDEFAULT_PARK_TOKENÁ”ô JDerefMutÁD—ö!û­ÖóTÄф﫮ž¡y|pscfüË&RUEH”‘2„¶'úüßá¾À”«L¥ž Ž´‚´=ôëüŸ96 Returns whether the wait was known to have timed out.ÁLò´=
”¡Ĥ A Condition VariableÁ½úüÁLI Condition variables represent the ability to block a thread such that itÁüŽ GD consumes no CPU time while waiting for an event to occur. ConditionÁüÖ MJ variables are typically associated with a boolean predicate (a condition)Áü¤
LI and a mutex. The predicate is always verified inside of the mutex beforeÁüñ
'$ determining that thread must block.Á úü KH Note that this module places one additional restriction over the systemÁüé JG condition variables: each condvar can be used with only one mutex at aÁü´ LI time. Any attempt to use multiple mutexes on the same condition variableÁü
LI simultaneously will result in a runtime panic. However it is possible toÁüÎ
LI switch to a different mutex if there are no threads currently waiting onÁÜ› the condition variable.Á·úü»52 # Differences from the standard library `Condvar`ÁñúüõMJ - No spurious wakeups: A wait will only return a non-timeout result if itÁüÃ30 was woken up by `notify_one` or `notify_all`.Áü÷KH - `Condvar::notify_all` will only wake up a single thread, the rest areÁüÃLI requeued to wait for the `Mutex` to be unlocked by the thread that wasÁ| woken up.Áü KH - Only requires 1 word of space, whereas the standard library boxes theÁüì,) `Condvar` due to platform limitations.Áü™$! - Can be statically constructed.Áü¾2/ - Does not require any drop glue when dropped.Áüñ0- - Inline fast path for the uncontended case.Á¢ú # ExamplesÁµú ```ÁüÁ&# use parking_lot::{Mutex, Condvar};Á¼è use std::sync::Arc;Á¤€ use std::thread;Áúü™=: let pair = Arc::new((Mutex::new(false), Condvar::new()));Áì× let pair2 = pair.clone();ÁõúüùLI // Inside of our lock, spawn a new thread, and then wait for it to startÁÔÆ thread::spawn(move|| {Áüá,) let &(ref lock, ref cvar) = &*pair2;ÁüŽ&# let mut started = lock.lock();Áĵ *started = true;ÁÔÎ cvar.notify_one();Á });Áñúüõ&# // wait for the thread to start upÁüœ'$ let &(ref lock, ref cvar) = &*pair;ÁüÄ" let mut started = lock.lock();Á”ç if !*started {Áüú  cvar.wait(&mut started);Á,ü¡JG // Note that we used an if instead of a while loop above. This is onlyÁüìLI // possible because parking_lot's Condvar will never spuriously wake up.Áü¹PM // This means that wait() will only return after notify_one or notify_all isÁ // called.Á<™çƒ­>*¦P/1i>I Ôº„IdÙ­>"#$'(+-/358;>ìØüìGD Creates a new condition variable which is ready to be waited on andÁl¸
notified.Áå­>!!
"ü›" üÓ0- Wakes up one blocked thread on this condvar.Áˆúü*' Returns whether a thread was woken up.Á¿úüÇIF If there is a blocked thread on this condition variable, then it willÁü•C@ be woken up from its call to `wait` or `wait_timeout`. Calls toÁüÝ-* `notify_one` are not buffered in any way.Áúü—/, To wake up all threads, see `notify_all()`.ÁËúăæúçƒìú use parking_lot::Condvar;Áœ úü¤ ! let condvar = Condvar::new();ÁÊ úüÒ =: // do something with condvar, share it with other threadsÁ”!úôœ! if !condvar.notify_one() {Áü¿!30 println!("Nobody was listening for this.");Á,÷!ú‰<"çƒT¢"æ æ­>! ­"!
#$®"ü¬$7|¯$ç ç­>±I! ¿$!
$$À$Ò,Æ$&$<closure_kind>Á%<closure_signature>Á%<upvars>Á%%$%¡^³^ñòóAbortÁôõUnparkOneRequeueRestÁö÷
RequeueAllÁøù UnparkOneÁúû
RequeueOneÁRÈÕøÖ•w ­> ±IÜ¢.$ÿ•&—–&´–&&$&¡^Ü—ÞÞ¨sßunparked_threadsÁàrequeued_threadsÁáhave_more_threadsÁâbe_fairÁã_sealedÁÆ
O|KYÂõPý˜ü±4!üÉ11. Wakes up all blocked threads on this condvar.Áÿ1úü‡2+( Returns the number of threads woken up.Á·2úü¿2EB This method will ensure that any current waiters on the conditionÁü‰3HE variable are awoken. Calls to `notify_all()` are not buffered in anyÁDÖ3 way.Áã3úüë330 To wake up only one thread, see `notify_one()`.ÁT¸4è è­>”?! Ã4!
'$Ä4ü¿68|Â6é é­>±I”?! Ò6!
($Ó6Ò,Ù6¡8(ÿ•)—–)´–))()¡^×—û˜ÔçA(ÿ•*—–*´–**(*¡^Ö™‚™üòJBüðEFC Blocks the current thread until this condition variable receives aÁŒ»F notification.ÁÑFúüÙFLI This function will atomically unlock the mutex specified (represented byÁüªGJG `mutex_guard`) and block the current thread. This means that any callsÁüùGJG to `notify_*()` which happen logically after the mutex is unlocked areÁüÈHKH candidates to wake this thread up. When this function call returns, theÁü˜I.+ lock specified will have been re-acquired.ÁËIúdÓI # PanicsÁäIúüìIJG This function will panic if another thread is waiting on the `Condvar`Áü»J$! with a different `Mutex` object.Á$ùJêëì ê­> ëçç¥ëÒ ìÚ 3ÙbŽd¥ìBÉD³^!¥,, ‰K!ÎìÉD þJ
+ÉD$ŠK mutex_guardÁ\K%'üñTŽü›LIF Waits on this condition variable for a notification, timing out afterÁüéL the specified time instant.ÁMúü•MIF The semantics of this function are equivalent to `wait()` except thatÁüãMGD the thread will be blocked roughly until `timeout` is reached. ThisÁü¯NIF method should not be used for precise timing due to anomalies such asÁüýNEB preemption or platform differences that may not cause the maximumÁüÇO41 amount of time waited to be precisely `timeout`.Á€PúüˆPGD Note that the best effort is made to ensure that the time waited isÁüÔPLI measured with a monotonic clock, and not affected by the changes made toÁ¤¥Q the system time.Á¾QúüÆQFC The returned `WaitTimeoutResult` value indicates if the timeout isÁÔ‘R known to have elapsed.Á°Rúü¸RJG Like `wait`, the lock specified will be re-acquired when this functionÁü‡S>; returns, regardless of whether the timeout elapsed or not.ÁÊSúdÒSð£ãSúüëSJ’¤üºT$æ¤TøTíîï í­> îçç¥ëÒ ìÚ 3ÙbŽd¥ïBÉDóTóTôTõTˆA t( ¼Í¥Š´=!¥.. —U!²§ ƒU
-ÉD$˜UѦ\¦UtimeoutÁ<ÓU*,üùW^œüWðñ ð­> ñBÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¿±´=! X!
/$XÒ,—X³±<©XÃZ/ÿ•0—–0´–00/0³^ý˜‚™ _/ÿ•1—–1´–11/1¡^³^³^ B¤“`/ÿ•2—–2´–22/2”?³^é´ ”?ý˜üÝsü¤lKH Waits on this condition variable for a notification, timing out after aÁ¼ôl specified duration.Ámúü˜mIˆ¨üæmIF the thread will be blocked for roughly no longer than `timeout`. ThisÁü´nI¬©ü‚oEÿ©üÌo4Ϊ…púüpG˜«üÙpL髤ªq¾¬ÃqúüËqFè¬Ô–r·­µrúü½rJç­üŒs>»®Däsòóô ò­> óçç¥ëÒ ìÚ 3ÙbŽd¥ôBÉD­Ö­Öû
 `£cbufÁ `àB¤GS
Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
³^ŸÈŸÈ ÈErrorÁ O˜éBLC §žC
D$¨ž± ®žGK AtomicUsizeÁ\ä „ÄEFôÑ Ô´ „¾ GGÎìü´Ž G¤Ø¤ØHIJHIJÍì¬ØH ÚØJI  GGü¢ž ü¥ ˆ ˆ¬ØâØâØÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
âØâØG Ï G
I¬Ø currentÁ<Þ æ þ ü÷I Ìú  ¬ØâØâØG  G
J¬Ø$• ¹ ì‘  
Küœ
% »hardware-lock-elisionÁü° ! µ ìôœê ìõ´ÿ üé - üª n ü¦ s ü ~ ç>MNOHIJNO
LL”?üñ
V üô
Š Šç>”?”?Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
”?”?L L
N$–  œ  ¦ üû 6 Ìþ  ç>”?”?L ˜ L
O$™  Ÿ RTVYÝPQüÑ#¬ñü÷WT A mutual exclusive primitive that is always fair, useful for protecting shared dataÁÏúüÓOL This mutex will block threads waiting for the lock to become available. TheÁü£?< mutex can be statically initialized or created by the `new`ÁüãOL constructor. Each mutex has a type parameter which represents the data thatÁü³KH it is protecting. The data can only be accessed through the RAII guardsÁüÿOL returned from `lock` and `try_lock`, which guarantees that the data is onlyÁüÏ+( ever accessed when the mutex is locked.ÁûúüÿFC The regular mutex provided by `parking_lot` uses eventual fairnessÁüÆIF (after some time it will default to the fair algorithm), but eventualÁüNK fairness does not provide the same guarantees an always fair method would.Áüß<9 Fair mutexes are generally slower, but sometimes needed.Áœ úü  OL In a fair mutex the waiters form a queue, and the lock is always granted toÁüð NK the next requester in the queue, in first-in first-out order. This ensuresÁü¿
OL that one thread cannot starve others by quickly re-acquiring the lock afterÁŒ  releasing it.Á¡ úü¥ ^[ A fair mutex may not be interesting if threads have different priorities (this is known asÁÄ„  priority inversion).Á úü¡ 30 # Differences from the standard library `Mutex`ÁÕ úüÙ ;8 - No poisoning, the lock is released normally on panic.Áü•
KH - Only requires 1 byte of space, whereas the standard library boxes theÁüá
.+ `FairMutex` due to platform limitations.Áü$•‚üµ2Âüè0ÿ‚ü™EB - Efficient handling of micro-contention using adaptive spinning.Áüß52 - Allows raw locking & unlocking without a guard.Áút™ă¨úçƒü´ use parking_lot::FairMutex;ÁüÔ(% use std::sync::{Arc, mpsc::channel};Á¤ýÇ„úÄ– const N: usize = 10;Á¯úü³OL // Spawn a few threads to increment a shared variable (non-atomically), andÁüƒ=: // let the main thread know once all increments are done.Á //ÁüÈQN // Here we're using an Arc to share memory among threads, and the data insideÁüš)& // the Arc is protected with a mutex.ÁüÄ+( let data = Arc::new(FairMutex::new(0));Áðúìô let (tx, rx) = channel();Á¤’ for _ in 0..10 {Áü§96 let (data, tx) = (Arc::clone(&data), tx.clone());Áüá thread::spawn(move || {ÁüKH // The shared state can only be accessed once the lock is held.ÁüÍMJ // Our non-atomic increment is safe because we're the only threadÁü›GD // which can access the shared state when the lock is held.Áüã'$ let mut data = data.lock();Á¼‹ *data += 1;ÁÜ£ if *data == N {Áü¿%" tx.send(()).unwrap();Á
üóGD // the lock is unlocked here when `data` goes out of scope.Á });Áú‰Íú¼Ñ rx.recv().unwrap();Á烥SSÍìÉD ÖJü½8ü¬@= Creates a new fair mutex in an unlocked state ready for use.ÁíúüñKH This allows creating a fair mutex in a constant context on stable Rust.Á„ÊÉDÖJ¥UU‚ù Û
TÉD¹%ôÒüÅPM An RAII implementation of a "scoped lock" of a mutex. When this structure isÁü–<9 dropped (falls out of scope), the lock will be unlocked.ÁÓúü×NK The data protected by the mutex can be accessed through this guard via itsÁü¦+( `Deref` and `DerefMut` implementations.ÁtÛW¥XXWÍì¥ îçç¥ëÒ ìÚ 3ÙbŽd¥·A—þêNPü˜!$üŸOL An RAII mutex guard returned by `FairMutexGuard::map`, which can point to aÁüï# subfield of the protected data.Áúü—WT The main difference between `MappedFairMutexGuard` and `FairMutexGuard` is that theÁüïKH former doesn't support temporarily unlocking and re-locking, since thatÁü» PM could introduce soundness issues if the locked object is modified by anotherÁ\Œ! thread.Á¤¡!Z¥[[Zþ º!ïïžó@ ôïI õÚ ?ÌBC½·A—þ¶!XZL†^`beâÃ\]ÔÑŒæüîB? A mutual exclusion primitive useful for protecting shared dataÁ±úüµOÁßü…?šàüÅOãàü•K¼áüáO‘âü±+êâÝú # FairnessÁðúüôOL A typical unfair lock can often end up in a situation where a single threadÁüÄPM quickly acquires and releases the same mutex in succession, which can starveÁü•NK other threads waiting to acquire the mutex. While this improves throughputÁüäOL because it doesn't force a context switch when a thread tries to re-acquireÁü´ @= a mutex it has just released, this can starve other threads.Áõ úüù QN This mutex uses [eventual fairness](https://trac.webkit.org/changeset/203350)ÁüË
GD to ensure that the lock will be fair on average without sacrificingÁü“ MJ throughput. This is done by forcing a fair unlock on average every 0.5ms,Áüá MJ which will force the lock to go to the next thread waiting for the mutex.Á¯ úü³ MJ Additionally, any critical section longer than 1ms will always use a fairÁü
NK unlock, which has a negligible impact on throughput considering the lengthÁäÐ
 of the critical section.Áí
úüñ
NK You can also force a fair unlock by calling `MutexGuard::unlock_fair` whenÁüÀB? unlocking a mutex instead of simply dropping the `MutexGuard`.Áƒúü‡3½é»úü¿;†êüûKËêüÇ*' `Mutex` due to platform limitations.Áüò$•‚ü—2ÂüÊ0ÿ‚üûE‚ìüÁ5Ñìü÷FC - Supports eventual fairness so that the mutex is fair on average.Áü¾SP - Optionally allows making the mutex fair by calling `MutexGuard::unlock_fair`.Áút–ă¥úçƒܱ use parking_lot::Mutex;ÁüÍ(ëí¤öÇ„úĵî¨úü¬Oãîüü=¼ï‚ðüÁQ’ðü“)íðü½'$ let data = Arc::new(Mutex::new(0));Áåúìéàñ¤‡†òüœ9¤òüÖçòüöKóüÂMåóüG¼ôüØ'õ¼€½õܘÝõü´%‚ö°öüèGÇö—÷ú‰Âú¼ÆÄ÷烥__‚ù õ×Lü /ü™;8 Creates a new mutex in an unlocked state ready for use.ÁÕúüÙFC This allows creating a mutex in a constant context on stable Rust.Á\­ÉD×L¥aa‚ù ¹
`ÉD¹&Ô¤!ü—P»úüè<•û¥ úü© Nçûüø +¿üT­!c¥ddcþ ¼!çç¥ëÒ ìÚ 3ÙbŽd¥B—þ¸!NPüÖ$ üé!KH An RAII mutex guard returned by `MutexGuard::map`, which can point to aÁüµ"#áþÙ"úüÝ"OL The main difference between `MappedMutexGuard` and `MutexGuard` is that theÁü­#Kûÿüù#PЀ\Ê$©„ß$f¥ggfþ ô$ïïžó@ ôïI õÚ ?ÌBC½B—þð$XZD$•vwxy}~ËŸ2”ÞŽhi× `hkíëhl¼ _hnAtomicU8ÁD¦üÀho®¼Àhp¨hrSpinWaitÁDÛµhsÇs”å JhtDEFAULT_UNPARK_TOKENÁ¤ù IhuüÑå$öØÚÉËüö&¿Á¨ª˜š„ÂŒvxgiDF”‘D—hÒM¤©hÒM¤ÃhÒM¤ÝhÒMtÊž?{|ìÖ üß<9 Returns whether the associated `Once` has been poisoned.Á úü¨LI Once an initialization routine for a `Once` has panicked it will foreverÁüùJG indicate to future forced initialization routines that it is poisoned.ÁDÝ ž?zz
{Ì– ü­
EB Returns whether the associated `Once` has successfully executed aÁ
 closure.Á$ ž?zz
| 2üã C@ A synchronization primitive which can be used to run a one-timeÁü§ JG initialization. Useful for one-time initialization for globals, FFI orÁÔò  related functionality.Á
úü‘
2/ # Differences from the standard library `Once`ÁÄ
úüÈ
74 - Only requires 1 byte of space, instead of 1 word.Áü€# - Not required to be `'static`.Áü¤OL - Relaxed memory barriers in the fast path, which can significantly improveÁüô(% performance on some architectures.ÁüE‚ìãúăöúçƒÔ‚ use parking_lot::Once;Áúü¡%" static START: Once = Once::new();ÁÇúÄË START.call_once(|| {Áüä" // run initialization hereÁ<‡Œˆ<çƒú@bÚè=UE~Oú@22hOú@}}
~h}}OL³ú@ƒÔõüà Creates a new `Once` value.Áú@
üü ü¼-* Returns the current state of this `Once`.Á,ƒŒ Œú@ž? 
üâ$?üíLI Performs an initialization routine once and only once. The given closureÁü¾KH will be executed if this is the first time `call_once` has been called,ÁüŽ41 and otherwise the routine will *not* be invoked.ÁÇúüÏGD This method will block the calling thread if another initializationÁü›! routine is currently running.ÁÁúüÉIF When this function returns, it is guaranteed that some initializationÁü—KH has run and completed (it may not be the closure specified). It is alsoÁüçKH guaranteed that any memory writes performed by the executed closure canÁü·C@ be reliably observed by other threads at this point (there is aÁüÿLI happens-before relation between the closure and code executing after theÁ return).Ááúăüú<„çƒÔª§¯úô· static mut VAL: usize = 0;ÁüÚ$! static INIT: Once = Once::new();Áƒúü‹KH // Accessing a `static mut` is unsafe much of the time, but if we do soÁüÛIF // in a synchronized fashion (e.g. write once or read all) then we'reÁ”© // good to go!Á‚ðüËJG // This function will only call `expensive_computation` once, and willÁüšLI // otherwise always return the value returned from the first invocation.Áüë" fn get_cached_val() -> usize {Á„’ 
unsafe {Áü§  INIT.call_once(|| {ÁüË .+ VAL = expensive_computation();Á });Á|! VALÁL¦!,´!ú‰¾!úüÆ!)& fn expensive_computation() -> usize {Átô! // ...Á<‡" # 2Á,“"ú‰<"烩"úd±"ð£Â"úüÊ"@= The closure `f` will only be executed once if this is calledÁü#LI concurrently amongst many threads. If that closure panics, however, thenÁüà#LI it will *poison* this `Once` instance, causing all future invocations ofÁô±$ `call_once` to also panic.ÁLé$ ú@³^ ö$Í츽 ó$–"¸½³^D˜%¸½³^˜"³^
ƒ¸½$÷$± ý$BDÄ&ƒÿ•—–´–ƒ¸½ž?³^ Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¸½üÚ*Nüþ&GD Performs the same function as `call_once` except ignores poisoning.ÁÊ'úüÒ'HE If this `Once` has been poisoned (some initialization panicked) thenÁüŸ(KH this function will continue to attempt to call initialization functionsÁüï($! until one of them doesn't panic.Á˜)úü )IF The closure `f` is yielded a structure which can be used to query th
 `£cƒÕ `àB¤GS
ªÖ ®S
$¯S± µS”›œâØ RawMutexFairÁdû˜šÔÑ6´ñç2üŠ2/ Raw fair mutex type backed by the parking lot.Á·AAƒÍu?r|ŠœB·Aç24˜B·A
œ˜Büá/·AŸ ¡¢£¤¢¤£¡„—$žž·A„åžžB ·A³^ž ž
¡Ôú ·Až ž
¢$‡¼Ê ·A³^ž Ûž
£ܘL›˜ ˜·Až ¥ž
¤üÚ3·A¦§§¦ä¢ ·A³^¥ ¸¥
¦¬÷$ š š·A³^¥ ¥
§$‡ ü® 4·A©ª«¬! «¬¨¨B

¨¨Bü€ 8  ·A·A¨ ¨
«$“ ³±<™ üû 7 œ œ·A·A¨ ¨
¬ ³±<’ ¿ÀÁÂà  ­¯„2$ã Š­°ÜD‰ üÀ­³®D“ ¼À­´û ­Ö­µÂrLÏ ­¨ ­¸ïrT÷ Ë­¹ µ­º¨sd Þ­»ƒP\› ­¼ƒPš­¼Çs”¨ J­½ óT­¾ *- Äî  ÷”¹ ç„Þ ÙÉË·¹¦¨oq”Á bü×* dè õPü+ l  õP¤« ­ÒM¤Š
T
­ÒMœÖ
ü¨
- * Raw mutex type backed by the parking lot.Á
BŽË…͘s»ØÄ ­ÃÂOüå+ ÇÈÉÊËÊÈËɤ— $ ÅÅB„æ ÅÅ GuardNoSendÁ ˆ ºÁê%B=Ó+t   B³^Å ¨ Å
È ÔÛ ž žBÅ ç Å
É ¼×! 4á! Ÿ ŸB³^Å è! Å
Ê$é! Ü$ L $    BÅ ª$ Å
Ë$«$ üœ%/ ÎÎÍäà% \ê% ¡ ¡B³^Ì ö% Ì
Í$÷% ¬ª( $´( ¢ ¢B³^Ì ¹( Ì
Î$º( üµ)0 ÑÒÓ! ÒÓlì) Dñ) ÏÏÔºdŠ* <* ÏÏ¿±üµ*2 t¸* £ £B¿±Ï Ç* Ï
Ò$È* ³±<Î* üü-1 dÿ- ¤ ¤BÔºÏ Œ. Ï
Ó$. ³±<“. l¿1 Ö×ÛÝüÊ22 ¬Ø2 ¥ ¥BÔ î2 Ô
Õ$ï2 üÉ7 \×7 ¦ ¦B³^Ô ã7 Ô
Ö$ä7 ü¿85 LÂ8 ­§ §B³Ô Ì8 Ô
×$Í8 ³±<Ó8 ÐC ×ÿ•Ø—–Ø´–ØØ×Ø¡^×´ǵ±D ×ÿ•Ù—–Ù´–ÙÙ×Ù¡^¼µ³^¤ÔD ×ÿ•Ú—–Ú´–ÚÚ×Ú¡^ǵüœP' \ŸP ­¨ ¨B³^Ô «P Ô
Û$¬P 
force_fairÁT²P ´ˆR Ûÿ•Ü—–Ü´–ÜÜÛÜ¡^Þ™õP ɵœ÷Z LúZ ­© ©B³^Ô „[ Ô
Ý$…[ t¾úûüýþÿƒŽ
KÞࢄð
GÞá½
ÀÞã©
¿Þä„2$Ã
ŠÞåa$ß
á.ÞçàÖ
„ÄÞé®D…
¼ÀÞê
RawRwLock_ÁT¯
ÃÞìRawRwLockUpgradeÁ„»
âÞí¨
Þï 
[ÞðFilterOpÁDú
ÞñïrT„
ËÞòˆUL
§ÞóˆU¨ÞóD›
µÞô¨sd¥
ÞÞõƒP\³
ÞöƒPšÞöû
­ÖÞø
óTÞù
óöå脇
ÛÞËÎ
¿

üÍ(
¨«˜D—

dg„Ò
YJM47%(ñóàâÏÑLÇ
­¯¼´
Þ”?ôž
Œ¤
Þ”?Ü·

Þ”?¼ü
T
Þ”?ÌÅ

Þ”?¼
T“
Þ”?ìü
d
ÞúUü³

ÞúUüí!
„ó
ÞúU¤õ
üº:
7 Raw reader-writer lock type backed by the parking lot.ÁL€
ÈBK/n/Ê¡#
,
Þƒƒç>ü§-
ÈB†ˆŠŒŽÄÅÉÊËÆÇÈÌÍŒˆŽŠ¬Û

ÈB„¯
\´
½ÝÄé

ª ªÈB³^ û

ˆ
ü¿$
”Â
« «ÈB Õ


ü÷!

¬ ¬ÈB³^ 

Š$“
¬³

­ ­ÈB³^ Â


üž!

® ®ÈB ±

Œ
ôÂ!
lÌ!
¯ ¯ÈB³^ Ú!

$Û!
Üë$
Lî$
° °ÈB ø$

Ž$ù$
ü‹&%
œŽ&
± ±ÈB ¢&

$£&
ü–'1
ÈB‘ÏÐÑÒüÜ'#
Ӿ'
² ²ÈB³^ ù'

$ú'
üü(&
 )
³ ³ÈB³^ œ)

$)
ä¼+
\Æ+
´ ´ÈB³^ Ò+

$Ó+
üå,
tï,
µ µÈB³^ þ,

$ÿ,
ü„.6
ÈB–ÔÔÏ.
LÙ.
 ÈB³^ ã.

$ä.
ü12
ÈB˜šœÖרÙÚÛšœlº1
D¿1
ÔºdØ1
<Ý1
¿±üƒ2>
Ϡ2
· ·ÈBÈBÖ š2

š$2
³±<¡2
üÜ4?
§4
¸ ¸ÈBÈB× õ4

$ö4
³±<ü4
ü©7;
´¬7
¹ ¹ÈBÔº Ã7

œ$Ä7
³±<Ê7
üç:<
Äê:
º ºÈB¿± ƒ;

$„;
³±<Š;
ü‰>6
ÈBŸ ÝÞ ŸüÔ>
¬×>
» »ÈB³^ž í>
ž
Ÿ$î>
üÇ@+
ÌÊ@
¼ ¼ÈBž ä@
ž
 $å@
üãB;
ÈB¢£àᣢü³CH
ì¶C
½ ½ÈB×þ¡ ÔC
¡
¢$ÕC
³±<ÛC
ü”FI
ü—F
¾ ¾ÈB»ÿ¡ ·F
¡
£$¸F
³±<¾F
üÙH4
ÈB¥¦§¨©ãäåæç¥¦¨©§Ì¢I
|¥I
¿ ¿ÈB³^¤ µI
¤
¥$¶I
üK%
œK
À ÀÈB¤ ¤K
¤
¦$¥K
ü³M"
Œ½M
Á ÁÈB³^¤ ÏM
¤
§$ÐM
ĤR
<®R
 ÂÈB³^¤ ¶R
¤
¨$·R
üóT$
\ýT
à ÃÈB¤ ‰U
¤
©$ŠU
üöW8
ÈB«¬éꬫüÃX'
´ÍX
Ä ÄÈB³^ª äX
ª
«$åX
ü¹]
|Ã]
Å ÅÈB³^ª Ó]
ª
¬$Ô]
üÚ^=
ÈB®¯ìí¯®ü¬_%
¤¶_
Æ ÆÈB³^­ Ë_
­
®$Ì_
üËa(
¼Õa
Ç ÇÈB³^­ ía
­
¯$îa
ü¦d9
ÈB±²³´ðïòñ³±´²üôd=
Ì÷d
È ÈÈB¿±° ‘e
°
±$e
³±<˜e
ü»g<
¼¾g
É ÉÈBÔº° Ög
°
²$×g
³±<Ýg
üŽj<
Œ˜j
Ê ÊÈB¿±° ªj
°
³$«j
³±<±j
üûl;
|…m
Ë ËÈBÔº° •m
°
´$m
³±<œm
täo
ÈB¶·¸¹º¼¾ÀÂÄÆÇÈÊÌÍÎÏÓØÝÞüp7
¤’p
ÞÌ ÌÈBµ §p
µ
$¨p
 recursiveÁL®p
ü˜z7
¤›z
ÞÍ ÍÈBµ °z
µ
·$±z
½L·z
üŽƒ*
Ä‘ƒ
ÞÎ ÎÈBµ ªƒ
µ
¸$«ƒ
üà‡*
Äã‡
ÞÏ ÏÈBµ ü‡
µ
¹$ý‡
ü³?
Ϧ
ÞÑ ÑÈB³µ Ê
µ
º
³±
œŒŽ
ºÿ•»—–»´–»»º»¡^РД? ÈBü‚–1
¬…–
ÞÒ ÒÈB³^µ ›–
µ
¼$œ–
»èT¢–
ü–—%
¼ÿ•½—–½´–½½¼½¡^”?Þ™õP±ê³”ü”ŸM
„—Ÿ
ÞÔ ÔÈB³µ ¨Ÿ
µ
¾$©Ÿ
½L¯Ÿ
³±<ÀŸ
œûŸ
¾ÿ•¿—–¿´–¿¿¾¿¡^Ó Ó”?³”±ê䯮
”²®
ÞÕ ÕÈB³^µ Å®
µ
À$Æ®
¼Ö°
Àÿ•Á—–Á´–ÁÁÀÁ¡^¡ê±”üÒ´@
¤Õ´
Þ× ×ÈB³µ ê´
µ
Â$ë´
³±<ñ´
œ¬µ
Âÿ•×–ô–ÃÃÂá^Ö Ö”?±”üÿ¾2
´‚¿
ÞØ ØÈB³^µ ™¿
µ
Ä$š¿
»èT ¿
üðÃ!
Äÿ•Å—–Å´–ÅÅÄÅ¡^ô•î—üíÓ"
„ðÓ
ÞÙ ÙÈBµ Ô
µ
Æ$‚Ô
üœØ8
dŸØ
ÞÚ ÚÈB³µ ¬Ø
µ
Ç$­Ø
³±<³Ø
Ä‘Ú
t”Ú
ÞÛ ÛÈB³^µ £Ú
µ
È$¤Ú
ÌýÚ
Èÿ•É—–É´–ÉÉÈÉ¡^ô•±”üÇÞ&
äÊÞ
ÞÜ ÜÈB³^µ çÞ
µ
Ê$èÞ
ÌÁß
Êÿ•Ë—–Ë´–ËËÊË¡^ô•±”üœã!
„¦ã
ÞÝ ÝÈB³^µ ·ã
µ
Ì$¸ã
ì‘ä
œ”ä
ÞÞ ÞÈB³^µ ¨ä
µ
Í$©ä
ô²å
¤µå
Þß ßÈB³^µ Êå
µ
Î$Ëå
ü¥é
œ¯é
Þà àÈB”?,³^µ,ÐÐ Ìé
µÍì´£üÿé/
–"´£÷•ü„ê*
´£÷•˜"õP\£ê
Ï´£$Íé
 new_stateÁLÛé
callbackÁDõé
gi”ðì
Ïÿ•Ñ—–Ñ´–ÑÑÏÑ´£¡^úUˆUnparkÁŠSkipÁŒStopÁü@Únq«éò á.á.aã.»Ì-IÜžB2®”?D‘ò
Ïÿ•Ò—–Ò´–ÒÒÏÒ´£¡ê´£œ¦üÃõO
„Æõ
Þá áÈB³”?µ ×õ
µ
Ó$Øõ
³±<Þõ

prev_valueÁTøõ
Çþ
Óÿ•Ô—–Ô´–ÔÔÓÔ¡^×´±”†€
Óÿ•Õ—–Õ´–ÕÕÓÕ¡^¼µ³^Ô©€
Óÿ•Ö—–Ö´–ÖÖÓÖ¡^±”̸Ž
Óÿ•×—–×´–××Óס^ô•±”ü·”½
\º”
Þâ âÈB³úU-”?µ-ÙÙ Ï”
µÍìá«ô¨•
ã“"á« ã”?Ì­•
ã᫱¬˜"$•
Øá«$Д
³±<Þ”
tokenÁ,€•
£Dž•
validate_flagsÁtЕ
އž
Øÿ•Ú—–Ú´–ÚÚØÚá«¡^×´³”°¶ß
Øÿ•Û—–Û´–ÛÛØÛá«¡^¼µ³^¤æŸ
Øÿ•Ü—–Ü´–ÜÜØÜá«¡^±”Ô¾ª
„Áª
Þä äÈB³^µ Òª
µ
Ý$Óª
ÔŒ¬
¬
Þå åÈB³^µ  ¬
µ