Files
archy/core/target/debug/deps/liblock_api-0505e0f5062627a1.rmeta
T

594 lines
277 KiB
Plaintext
Raw Normal View History

2026-01-24 22:59:20 +00:00
rust
NR#rustc 1.93.0 (254b59607 2026-01-19)Á³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Á
scopeguardÁÂå|A}=ÝU\`ð.j-f245d02bea2a9ebfÁë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Áá<™arc_lockÁT£¤™ I÷Í¤Ï ManuallyDropÁd¨<ͤ‚ ÷ Ýͤ¼
StableAddressÁl
owning_refÁdó´é DeserializeÁ\ÈserdeÁ<²Œ¨ DeserializerÁdÕ/˜(&( SerializeÁLãP˜IGI
SerializerÁTîr˜kik
ArcMutexGuardÁl³Â<µÁÍT¿Á¤µÁËIûͤÓË<†ÍT¤†Ë÷ áͤÀËÈl–å´íËý˜Œ¬Ë«˜ËÏ8˜64ðQ˜OMArcReentrantMutexGuardÁ´èá<áàÍTëà¤áà»I÷ͤϻ<‚ͤ‚»÷ Ýͤ¼»Èl’å´é»ý˜Œ¨»«˜»Ï8˜64ðQ˜OMArcRwLockReadGuardÁ”š¥<›¤ÍT¥¤¤›¤»ArcRwLockWriteGuardÁœÄ<ÅŒÍTÏŒ¤ÅŒ»ArcRwLockUpgradableReadGuardÁ䵫<¶ªÍTÀª¤¶ª³_ GuardSendÁ
ì GuardNoSendÁ
ìmutexÁ        RawMutexÁINITÁ GuardMarkerÁlockÁtry_lockÁunlockÁ is_lockedÁ  RawMutexFairÁ unlock_fairÁbumpÁ 
RawMutexTimedÁ¯ try_lock_forÁtry_lock_untilÁ Ë"""@"dataÁ 'Ì ' *Ì * -Ì -- -
into_innerÁ 2Ì 22from_rawÁ2 const_newÁ 7Ì 77make_guard_uncheckedÁ7 7Ÿ 7get_mutÁ7» 7 force_unlockÁ7@7data_ptrÁ BÌ BBforce_unlock_fairÁ FÌ FF F°  KÌ KK> OÌ OOï  SÌ SSÍVLockedPlaceholderÁW
VYÍ 
['aÁ[Ì [  _¢_Ì __À
_
dd_try_mapÁgàgè_try_map_or_errÁjàjèj_unlockedÁnènà_leakÁ  r¢rÌ rrÞ r
unlocked_fairÁwèwàrð  
{¢{Ì {{š{ ¢Ì  ¢Ì ² ¢Ì Í ¢Ì Í ¢Ì  ¢Ì  ¢Ì 
¡à¡èð¤à¤èŒ§à§è§¯ «¢«Ì ««Þ  °¢°Ì °°š° ¢Ì  »¢»Ì »»² À¢ÀÌ ÀÀÍ Å¢ÅÌ ÅÅÍremutexÁËËËËËËËËËË Ë
Ë Ë Ë
ËËËËË GetThreadIdÁÞ÷
Þnonzero_thread_idÁËRawReentrantMutexÁáÌ ááownerÁá
lock_countÁáÀ
á
get_thread_idÁËèÌ è¥ËëÌ ë¥ËîÌ î¥î÷
î
lock_internalÁòèî ô îŸ ö î® î» îis_owned_by_current_threadÁËûÌ û¥ûÞ ûð ËÌ ¥° ƒ   ËReentrantMutexÁÌ ¥@á ËÌ ¥ËÌ ¥ËÌ ¥ ©
ËÌ ¥Ì
Û
Ë ¡Ì ¡¥¡¡ý
¡ ¡Ÿ ¡¦¡» ¡ø¡»¡@¡ÔË
®Ì ®¥®®õË ³Ì ³¥³³ ³° Ë ¹Ì ¹¥¹¹>Ë
¾Ì ¾¥¾¾ïËÃÌ Ã¥ÃÃÍÇ÷È
ÇÊÍËÌ¢ÌÌ Ì¥ÌËÑ¢ÑÌ Ñ¥ÑÑçÑ
×à×èÑðÚàÚèÑŒÝàÝèݯѷáèáàËä¢äÌ ä¥ääÞ äÿêèêàäð Ëî¢îÌ î¥îîšîËõ¢õÌ õ¥õõ²Ëû¢ûÌ û¥ûûÍË¢Ì ¥ÍË¢Ì ¥ËŒ¢ŒÌ Œ¥ŒŒ
àèŒðà茌àè¯Ë¢Ì ¥Þ Ë¡¢¡Ì ¡¥¡¡š¡Ë¨¢¨Ì ¨¥¨¨²Ë®¢®Ì ®¥®®ÍË´¢´Ì ´¥´´ÍrwlockÁ»»»»»»»» RawRwLockÁÃ÷
à à lock_sharedÁÃtry_lock_sharedÁÃ
unlock_sharedÁÃlock_exclusiveÁÃtry_lock_exclusiveÁÃunlock_exclusiveÁû Ãis_locked_exclusiveÁ»
RawRwLockFairÁÎunlock_shared_fairÁÎunlock_exclusive_fairÁÎ bump_sharedÁÎbump_exclusiveÁ»RawRwLockDowngradeÁÓ downgradeÁ»RawRwLockTimedÁÕÕ¯Õtry_lock_shared_forÁÕtry_lock_shared_untilÁÕtry_lock_exclusive_forÁÕtry_lock_exclusive_untilÁ»RawRwLockRecursiveÁÜlock_shared_recursiveÁÜtry_lock_shared_recursiveÁ»RawRwLockRecursiveTimedÁßtry_lock_shared_recursive_forÁßtry_lock_shared_recursive_untilÁ»RawRwLockUpgradeÁâlock_upgradableÁâtry_lock_upgradableÁâunlock_upgradableÁâupgradeÁâ try_upgradeÁ»RawRwLockUpgradeFairÁèunlock_upgradable_fairÁèbump_upgradableÁ»RawRwLockUpgradeDowngradeÁëdowngrade_upgradableÁëdowngrade_to_upgradableÁ»RawRwLockUpgradeTimedÁîtry_lock_upgradable_forÁîtry_lock_upgradable_untilÁîtry_upgrade_forÁîtry_upgrade_untilÁ»óÌ óó@óá »øÌ ø»ûÌ û»þÌ þþ þ©
»ƒÌ ƒƒÌ
ƒÛ
»ˆÌ ˆˆmake_read_guard_uncheckedÁˆmake_write_guard_uncheckedÁˆreadÁˆtry_readÁˆwriteÁˆ try_writeÁˆ¦ˆ» ˆ§'ˆforce_unlock_readÁˆforce_unlock_writeÁˆ@ˆÔ»˜Ì ˜˜force_unlock_read_fairÁ˜force_unlock_write_fairÁ»Ì  try_read_forÁtry_read_untilÁ
try_write_forÁtry_write_untilÁ»¤Ì ¤¤read_recursiveÁ¤try_read_recursiveÁ»©Ì ©©try_read_recursive_forÁ©try_read_recursive_untilÁ» ®Ì ®®make_upgradable_guard_uncheckedÁ®upgradable_readÁ®try_upgradable_readÁ»
´Ì ´´try_upgradable_read_forÁ´try_upgradable_read_untilÁ» ¹Ì ¹¹>» ½Ì ½½ï»
ÁÌ ÁÁÍ»ÅÌ Å»È¢ÈÌ ÈÈÆ%È
ÍàÍèÈðÐàÐèÈŒÓàÓèӯȷ×è×à»Ú¢ÚÌ ÚÚÞ ÚÿßèßàÚð »ã¢ãÌ ããšã»é¢éÌ éé²»î¢îÌ îîÍ»ó¢óÌ óóÍ»øÌ ø»û¢ûÌ ûûÆ%û
àèûðƒàƒèûŒàè¯û·ŠèŠà»¢Ì Ñ(»¢Ì Ô-»¢Ì Þ ÿœèœàð » ¢ Ì   š »¦¢¦Ì ¦¦»«¢«Ì ««²»°¢°Ì °°Í»µ¢µÌ µµÍ»º¢ºÌ º» ¾¢¾Ì ¾¾Æ%¾·ÃèÃྤ,¾³,»!È¢ÈÌ ÈÈÞ ÈÿÍèÍàÈð »"Ñ¢ÑÌ ÑÑÑ(Ñ
with_upgradedÁÖRetÁÖèÑtry_with_upgradedÁÙÓ?Ùè»#Ü¢ÜÌ ÜÜÐ.Üç.»$â¢âÌ ââtry_with_upgraded_forÁæÓ?æèâtry_with_upgraded_untilÁéÓ?éè»%ì¢ìÌ ììšì»&ò¢òÌ òò²»'÷¢÷Ì ÷÷Í»(ü¢üÌ üüÍ»)¢Ì »*¢Ì »+¢Ì 
àèðàètry_map_or_elseÁà读,¢Ì Þ »-œ¢œÌ œœšœ».¢¢¢Ì ¢¢²»/§¢§Ì §§Í»0¬¢¬Ì ¬¬Í»1±¢±Ì ±»2µ¢µÌ µ»3¹¢¹Ì ¹¹
½à½è¹ðÀàÀ蹌ÃàÃèï»4Ç¢ÇÌ ÇÇÞ »5Ì¢ÌÌ Ì̻̚6Ò¢ÒÌ ÒÒ»7×¢×Ì ×ײ»8Ü¢ÜÌ ÜÜÍ»9á¢áÌ ááÍ Ìç¢çÌ ççÀ
ç
n w  MappedMutexGuardÁï¢ïÌ ïï@ïá ï
ËReentrantMutexGuardÁö¢öÌ ö¥ööçö
á ê ËMappedReentrantMutexGuardÁÿ¢ÿÌ ÿ¥ÿÿ@ÿá ÿ
»¢Ì Æ%
× ß »¢Ì Æ%
Š œ »RwLockUpgradableReadGuardÁ¢Ì Æ%
Ã Í Ö Ù æ é »MappedRwLockReadGuardÁ£¢£Ì ££@£á £
»MappedRwLockWriteGuardÁª¢ªÌ ªª@ªá ª







!
:
;
<
=
>
?
@
A
E
I
J
V
V
V
Z
Z
Z
c
d
g
j
n
w
z


Š






¡
¤
§
µ
º
¿
Ä
Ä
Ä
É
É
É
à
ò
ô
ö
ø
ù
ú
þ
ÿ
ƒ

¥
¦
§
¨
©
ª
«
¬
­
²
·
¸
Ç
Ç
Ç
Ë
Ë
Ë
Ö
×
Ú
Ý
á
ê
í
ô
ú









§
­
³
³
³
¹
¹
¹
Æ
Ç
È
É
Ê
Ë
Ì
Í
Ï
Ð
Ñ
Ò
Ô
Ø
Ù
Ú
Û
Ý
Þ
à
á
ã
ä
å
æ
ç
é
ê
ì
í
ï
ð
ñ
ò

Œ

Ž










œ
 
¡
¢
£
§
¨
¬
­
±
²
³
·
¸
Ä
Ä
Ä
Å
Ì
Í
Ð
Ó
×
ß
â
è
í
ò
ò
ò
÷
÷
÷
ø
ÿ

ƒ

Š
œ
Ÿ
¥
ª
¯
´
´
´
¹
¹
¹
Â
Ã
Í
Ð
Ö
Ö
Ù
Ù
æ
æ
é
é
ñ
ö
û
û
û






¡
¦
«
«
«
°
°
°
½
À
Ã
Ñ
Ö
Û
à
à
à
å
å
å
ÞÃÎÓÕÜßâèëîŸ
 ì ϶o<Gy¨â""Ë%@ &á  ˆüPwTµ¹¼Ì YÄYúY¹Yà`Yà`WWX÷ èÚb«ïïÀNççÌëÀ
 ì
 ½^HPbïA¢Ì ìšZùšZ šZà`šZå`šZïïIó@ ôá  õ
 ì2ò<âª}A¢×ZÝZ¨âœ[ìœ[ùœ[ œ[à`œ[å`œ[¨âááä®Ëå»ËæÀ
ËçÕËXÊ9WN<¶ ³Y¥®\¨âî@ËŒá ËœM¸öq0.³Y‚]ÝZš]Äš]úš]ÝZà`š]à`ÈÈÉ÷ ÌTRèïööÖIûçËü
Ëÿ î¢×Z¥ì¹^ ¹^à`¹^å`¹^ÿÿ«J@Ëá Ë
ËówñkŒhÄð¢×Zû^_ì¶_ ¶_à`¶_å`¶_¨âóóö@»÷á »+$BZ[e³Y¹Y¹`Ĺ`ú¹`¹Yà`¹`Æ%»Œ
»üUfÏÏHä8×ZÝZìÆ%»Œ
»üUfÏÏHä¢×ZÝZ ôaà`ôaå`ôaÆ%»
»÷ŽÜsjh8×ZÝZìÆ%»
»÷ŽÜsjh¢×ZÝZù©c ©cà`©cå`©c÷KÆ%»œ
»6Eô6óö¢×ZÝZìd dà`då`d££ÞL§@»¨á »©
»èkˆÂ¿ m¢×ZÝZ¨â‘eì‘e ‘eà`‘eå`‘eªªªM®@»¯á »°
»ã/S!&”p¢×ZÝZ¨â›fì›fù›f ›fà`få`f
*"[çïëáÌöÿûóÅøº£±ª'"™ïèáøó£µªK¹óO½óS"YWçÀïÃÊÈûö®ÿÁóî°÷§£Üª{ç°ïîö¡ÿã ìœ£Ìªçï¦Òªç»ïõö¨ÿé«ò¢£×ªçÅïö´ÿóµü¬£áªè¨â]Ä/úà`ì ^ù> å` ?<ö*³Y³Y¤‘+¡+
"|+
Î.¹Y3D ¤+üÝ*S
"³Y¹Y ¯+¶+ü«*‹0Y\Ç*¹Y¼*³YåÇ.Ç.
UnsafeCellÁÉ.˜¸+ö)=ê „9Û¹Y¹YZD³Y³YL•.¤².Â.
"|².l-> Å.üü-U
"³Y¹Y Ð.×.ü·- 5Y\æ-³YLÍ-¹YÛ-³YݬmѹYÐ raw_mutexÁ37oL¢1­1ô“1
 t“1
5³Y¹YJ<2 °1·1üÍ0j6Y\ý0³YLä0¹Yò0³Y¬¹Y o#'^œ

¸¸ ®>

ê,Õr ÐÕrA³Y³Yß‚]‚]üú
á³Y‚] üã¯ñ®\®¸®¸b¯¸ÓZiVwƒ'[É,É,qË,˜¸+»\¡Ø ÊÕrM³Y‚]úŸ#³Y³Yß‚]‚]¤¢=²=
"|¢=
Î.ÝZ3D µ=üÉ=¿œô=
„ô=¼r …>Õr;d¥>
L¥>ÿr ¯>Õr< <Ê>³Y³Y<ò>ß‚]‚]Æ
á³Y‚] ‡?üÿ<”
³Y‚]ÝZ ’?™?üÁ<Ø š]¼Ý<ÝZÒ<Ç.Ç.¶lÉ.˜¸+ö)=ê „9ÛÝZýÝZý®\½Ët»u³YL]6q¡m³Y³Y]ß‚]‚]¤ãBóB
"|ãB§v-> öBüŠC¸œµC
„µC¼r ÆCÕr;dæC
LæCÿr ðCÕr< LD  l¦D

¯
á³Y] 
ÁD
 üÀB
³Y‚]ÝZ ÌDÓD ÒDüÝAöŸ š]¼žB³YLóA]lBÝZ“BÅyçÝZç®\­Ët«ut³Y<]1oVÕZ^ LHlHœHüóG-

tóG
Ÿ³Y]ÝZbTF< ŸH¦HüG— š]¼ÑG³YL¦G]l´GÝZÆG³YÚ‚]ÎÝZ‘o3Õ7;}¤ÈjØj
"|Èjl-> Ûj<ïjijY³Yü­jT
ó³Y¹Y €k‡küúi¹`d–j¹Y‹j¬mÒ¹YѳY!Q®Ä³Y³Y¤»nËn
"|»nl-> ÎnTânü nW
ó³Y¹Y önýn ünüÙm¤¹`d‰n³YTïm¹Yþm¬má¹Yà³Y¥
raw_rwlockÁ48qTþqŠrüïq

tïq
³Y¹YL>4 r”rü§qm¹`dØq³YT¾q¹YÍq³Y¯¹Y£à„$(`¤
#
ì ¡ÞKB´H˜W^e´Œ
#ÍX. 7> Ë»³_T†è
ÊË d•Êû ÊË,ã'"ÊÐ\
ÞºŒ”áºîtá8º÷%L» ÃæÂ'l×Îæ·(”é)Óæâ(t£.Õæþ)”Š7ÜæÖ*¼–:ßæÁ+„Â@âæÆ,¤âHèæ—-Ì Pëæó-¬£Uîæ4ªbóæÌT̆çÊI„ÄãïÊÖIœ¡¥öº«JÌÁÿº|´ëæ„ÆÄæ÷KÌ»¼æÞL¬¥œ£æªM´ðɪæüÍ»üÍOL This library provides type-safe and fully-featured [`Mutex`] and [`RwLock`]ÁüHE types which wrap a simple raw mutex or rwlock type. This has severalÁüæGD benefits: not only does it eliminate a large portion of the work inÁü®OL implementing custom lock types, it also allows users to write code which isÁüþ;8 generic with regards to different lock implementations.ÁºËü¾63 Basic usage of this crate is very straightforward:ÁõËüùOL 1. Create a raw lock type. This should only contain the lock state, not anyÁüÉ" data protected by the lock.Áüì@= 2. Implement the `RawMutex` trait for your custom lock type.Áü­C@ 3. Export your mutex as a type alias for `lock_api::Mutex`, andÁüñC@ your mutex guard as a type alias for `lock_api::MutexGuard`.Áüµ52 See the [example](#example) below for details.ÁëËüïNK This process is similar for [`RwLock`]s, except that two guards need to beÁü¾ OL exported instead of one. (Or 3 guards if your type supports upgradable readÁüŽ
GD locks, see [extension traits](#extension-traits) below for details)ÁÖ
Ë
# ExampleÁè
Ë
 ```Áüô
/, use lock_api::{RawMutex, Mutex, GuardSend};Áü¤ 2/ use std::sync::atomic::{AtomicBool, Ordering};Á× ËüÛ " // 1. Define our raw lock typeÁüþ '$ pub struct RawSpinlock(AtomicBool);Á¦ Ëüª *' // 2. Implement RawMutex for this typeÁüÕ *' unsafe impl RawMutex for RawSpinlock {Áü€
FC const INIT: RawSpinlock = RawSpinlock(AtomicBool::new(false));ÁÇ
ËüË
LI // A spinlock guard can be sent to another thread and unlocked thereÁü˜%" type GuardMarker = GuardSend;Á¾ËÄ fn lock(&self) {ÁüÛOL // Note: This isn't the best way of implementing a spinlock, but itÁü«52 // suffices for the sake of this example.Áüá%" while !self.try_lock() {}ÁL‡Ëü•$! fn try_lock(&self) -> bool {Á”º self.0ÁüÍTQ .compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed)ÁÄ¢ .is_ok()Á¼œÅËüÉ! unsafe fn unlock(&self) {Áüë30 self.0.store(false, Ordering::Release);Á¼œ¯Ëü³TQ // 3. Export the wrappers. This are the types that your users will actually use.Áüˆ;8 pub type Spinlock<T> = lock_api::Mutex<RawSpinlock, T>;ÁüÄMJ pub type SpinlockGuard<'a, T> = lock_api::MutexGuard<'a, RawSpinlock, T>;Á<—–šË´ž # Extension traitsÁµËü¹OL In addition to basic locking & unlocking functionality, you have the optionÁü‰KH of exposing additional functionality in your lock types by implementingÁüÕEB additional traits for it. Examples of extension features include:ÁËüŸ63 - Fair unlocking (`RawMutexFair`, `RawRwLockFair`)ÁüÖ74 - Lock timeouts (`RawMutexTimed`, `RawRwLockTimed`)ÁüŽ85 - Downgradable write locks (`RawRwLockDowngradable`)ÁüÇ1. - Recursive read locks (`RawRwLockRecursive`)Áüù0- - Upgradable read locks (`RawRwLockUpgrade`)ÁªËü®OL The `Mutex` and `RwLock` wrappers will automatically expose this additionalÁüþIF functionality if the raw lock type implements these extension traits.ÁÈË¤Ì # Cargo featuresÁáËüå-* This crate supports three cargo features:ÁËü—RO - `owning_ref`: Allows your lock types to be used with the `owning_ref` crate.Áüêkh - `arc_lock`: Enables locking from an `Arc`. This enables types such as `ArcMutexGuard`. Note that thisÁüÖ/, requires the `alloc` crate to be present.Á Ë»³#_$è
#ÊË "Êû !ÊË "ÊÐÞºáºîº÷%ÃæÂ'Îæ·(Óæâ(Õæþ)ÜæÖ*ßæÁ+âæÆ,èæ—-ëæó-îæóæÌçÊIïÊÖI
öº«J ÿº ææ÷KæÞL£æªMªæ ¼ùáüÅIF Marker type which indicates that the Guard type for a lock is `Send`.Á ˆ¡ÞKB´H˜ ˆh3 ˆ
¤@üªMJ Marker type which indicates that the Guard type for a lock is not `Send`.Á\—ÍX϶o<Gy š‰ÍXÊ2š‰ÍX
š‰ü® ÍX,×ï¶lTÝÇ.  ÍóÁ] 
PhantomDataÁ\Š ˲Š memÁ¡Õ ì DerefMutÁD½ù ´ÑÌüxL›TäªGI02̹üü! Basic operations for a mutex.ÁžËü¢KH Types implementing this trait can be used by `Mutex` to form a safe andÁüî! fully-functioning mutex type.ÁËd” # SafetyÁ¡Ëü¥HE Implementations of this trait must ensure that the mutex is actuallyÁüîJG exclusive: a lock can't be acquired while the mutex is already locked.Á ªâü¹Þ „¸„¸©âŒ¸Œ¥ Á¸„û
üÙ(% Initial value for an unlocked mutex.Á$ Œ¸„¥ ü’ KH Marker type which determines whether a lock guard should be `Send`. UseÁüâ >; one of the `GuardSend` or `GuardNoSend` helper types here.Á\ª |
ü¼ OL Acquires this mutex, blocking the current thread until it is able to do so.Á$“
± ±Œ¸ ˜

Œ¸$™
ܲü¥
C@ Attempts to acquire this mutex without blocking. Returns `true`Áüí
@= if the lock was successfully acquired and `false` otherwise.ÁDµ² ²Œ¸ ¾
Œ¸$¿ÄŸ¼Ó Unlocks this mutex.Áï˯µˆËü\Y This method may only be called if the mutex is held in the current context, i.e. it mustÁüñgd be paired with a successful call to [`lock`], [`try_lock`], [`try_lock_for`] or [`try_lock_until`].ÁÝËäå [`lock`]: RawMutex::lockÁü†$! [`try_lock`]: RawMutex::try_lockÁü¯1. [`try_lock_for`]: RawMutexTimed::try_lock_forÁüå52 [`try_lock_until`]: RawMutexTimed::try_lock_untilÁ4©³ ³Œ¸ °
Œ¸Üü½1. Checks whether the mutex is currently locked.ÁL„´ ´Œ¸ Ž
Œ¸$ü„'ü™@= Additional methods for mutexes which support fair unlocking.ÁÚËüÞPM Fair unlocking means that a lock is handed directly over to the next waitingÁü¯KH thread if there is one, without giving other threads the opportunity toÁüûJG "steal" the lock in the meantime. This is typically slower than unfairÁüÆ=: unlocking, but may be necessary in certain circumstances.Áw„¸ü„ÖŒ¸„¸(ŠÇ„¸4ŠÇ)ìŸü²41 Unlocks this mutex using a fair unlock protocol.Áë˯µËüŒSP This method may only be called if the mutex is held in the current context, seeÁüä63 the documentation of [`unlock`](RawMutex::unlock).Á\©µ µŒ¸ µ
Œ¸¬ŠüÂEB Temporarily yields the mutex to a waiting thread if there is one.ÁŒËü”LI This method is functionally equivalent to calling `unlock_fair` followedÁüåLI by `lock`, however it can be much more efficient in the case where thereÁܶ are no waiting threads.ÁÖ˯µïËü÷S¹ÇüÏ6•È$” Œ¸ 
Œ¸ü± (üÜGD Additional methods for mutexes which support locking with timeouts.Á¤Ëü¨PM The `Duration` and `Instant` types are specified as associated types so thatÁüù74 this trait is usable even in `no_std` environments.ÁÊ"„¸ü± ²ŠÇ„¸!ŠÇ„¸-ŠÇ) ! !©âŒ¸t!¦Ð©âŒ¸lÓ!ÄÐ! l!üà *' Duration type used for `try_lock_for`.ÁD”!dÓ!ü£!+( Instant type used for `try_lock_until`.Á<Ø!ü¨"8üæ!=: Attempts to acquire this lock until a timeout is reached.Ád«"· ·Œ¸®Ð ¸"
Œ¸$¹"timeoutÁ<¿"ü¨#9üæ"=‰Ñt«#¸ ¸Œ¸ÌÐ º#
!Œ¸$»#™Ò<Á#ôØ'üå#B? A mutual exclusion primitive useful for protecting shared dataÁ¨$Ëü¬$OL This mutex will block threads waiting for the lock to become available. TheÁüü$C@ mutex can also be statically initialized or created via a `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.Á9'Ì #$#$
 ì
 ½^HPbïA¹³Y¹Y7 ÷47
:³Y¹Y$ø4ü£:*üü5LI Acquires a mutex, blocking the current thread until it is able to do so.ÁÍ6ËüÕ6NK This function will block the local thread until it is available to acquireÁü¨7KH the mutex. Upon returning, the thread is the only thread with the mutexÁüø7LI held. An RAII guard is returned to allow scoped unlock of the lock. WhenÁüÉ8<9 the guard goes out of scope, the mutex will be unlocked.ÁŠ9Ëü’9LI Attempts to lock a mutex in the thread which already holds the lock willÁÌã9 result in a deadlock.ÁR|:$ª:º ºYççÌëÀ
 ì
 ½^HPbïAº³Y¹Y7 ¯:7
;³Y¹Y$°:ü>6üÕ;" Attempts to acquire this lock.Áü;Ëü„<LI If the lock could not be acquired at this time, then `None` is returned.ÁüÕ<LI Otherwise, an RAII guard is returned. The lock will be unlocked when theÁ¬¦= guard is dropped.ÁÀ=ËüÈ=! This function does not block.ÁR|ü=D—>» »Yø°ú°û°Ðü°ý°þ°ìHˈXêE>ççÌëÀ
 ì
 ½^HPbïA»³Y¹Y7  >7
<³Y¹Y$¡>ü€B#ü@74 Returns a mutable reference to the underlying data.ÁÌ@ËüÔ@KH Since this call borrows the `Mutex` mutably, no actual locking needs toÁü¤AIF take place---the mutable borrow statically guarantees no locks exist.Á<‡B¼ ¼Y ¼¹Y7 B7
=³Y¹Y$”Bü²CüÚB1ÇÁR|žCL¹C½ ½Y7 ÃC7
>³Y¹Y$ÄCü€H!üüC Forcibly unlocks the mutex.Á DËü¨DJG This is useful when combined with `mem::forget` to hold a lock withoutÁü÷DFC the need to maintain a `MutexGuard` object alive, for example whenÁ¬ÂE dealing with FFI.ÁÜEËdäE¯µõEËüýEJG This method must only be called if the current thread logically owns aÁüÌFGD `MutexGuard` but that guard has been discarded using `mem::forget`.Áü˜GA> Behavior is undefined if a mutex is unlocked when not locked.ÁR|ìGdŽH¾ ¾Y7 H7
?³Y¹Y$œHôÁKüÊH,) Returns the underlying raw mutex object.ÁûHËüƒIKH Note that you will most likely need to import the `RawMutex` trait fromÁüÓI=: `lock_api` to be able to call functions on the raw mutex.Á•JËdJ¯µ®JËü¶JC@ This method is unsafe because it allows unlocking a mutex whileÁüþJ0- still holding a reference to a `MutexGuard`.ÁÏK¿ ¿Y ¿³Y7 ÓK7
@³Y¹Y$ÔKü…P üÿK1. Returns a raw pointer to the underlying data.ÁµLËü½LJ©ôüŒMFüô¬×MÊõñMËdùM¯µŠNËü’NGD You must ensure that there are no data races when dereferencing theÁüÞNFC returned pointer, for example if the current thread logically ownsÁü©OIF a `MutexGuard` but that guard has been discarded using `mem::forget`.ÁDŒPÀ ÀY ¹Y7 •P7
A³Y¹Y$PüÇ],Ì CDDCôØ Ì]„Ù Ý]³YdÏ]YE!$&ü›b&üú]<9 Forcibly unlocks the mutex using a fair unlock protocol.Á»^ËüÃ^J©ôü’_Füô¬Ý_Êõ÷_Ëdÿ_¯µ`Ëü˜`JŠöüç`GÝöü³aA­÷R|‡bŒ©bÁ ÁYB »bB
E³Y¹Y$¼büíb-Ì GHHGôØ òb„Ù „c³YlõbYIJ!#&(ü×ePü¡c=‰ÑãcËüëcFC If the lock could not be acquired before the timeout expired, thenÁü¶dKH `None` is returned. Otherwise, an RAII guard is returned. The lock willÁü†e*' be unlocked when the guard is dropped.ÁR|ÃedÞe ÂY³Yø°ú°û°Ðü°ý°þ°ìHˈXêE>ççÌëÀ
 ì
 ½^HPbïA³Y¹YF ëeF
I³Y¹Y$ìe™Ò<òeü²jQüüg=‰Ñ¾hËüÆhFü‘iKß„üái*³…R|žjt¹jà ÃY³Yø°ú°û°Ðü°ý°þ°ìHˈXêE>ççÌëÀ
 ì
 ½^HPbïAóY¹YF ÈjF
J³Y¹Y$Éj™Ò<ÏjüŽw>Ì LMMLôØ “w„Ù  w¯ÚD–wĹY<¬wYNÅN/146Üáw<äwYKK
N³Y¹Yü¯x,Ì PQPQôØ ´x Ü Áx¯ÚD·xYRüR "%'äðx$óx¹YYOO
R³Y¹Y øxü®yDÌ TUUTôØ ³y„Ù Ày¯ÚD¶yà`¹YTÌyYVá`V/146üùy8üyÄÅÆ ÄY ÅÁ`Á`œÃ`è Á]Ä`bufÁÁ]Ê­\É:•Æê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ѼѼÒ¼ štÀ.S €zS
V³Y¹Y$zþ ‡zÄÏ{ŒÖ{ ñYèÚb«ïïÀNX+' WWñYüù{%ñYZá`Züµ|8¸|ÇÈÉ ÇñY ÈÁ`Á`œÃ`è Á]Ä`·ŽÁ]Ê­\É:•ÉÝY ¼|Y
Z$½|þ Ã|üʇ]¢\Ì ]^\]^©â×Z Ú‡ªâÝZ ó‡×ZD݇×Z$è‡×Z¢ï‡ÝZ$ÿ‡ÝZ¢†ˆšZÖ‡mo\km\ü¬ˆ?¢`Ì abba`Ñ“ µˆâ“ Ljó“D¸ˆ’”ȱ”ÓˆšZcdgjnq±ˆ?A`EG`ü®‰)üòˆ74 Returns a reference to the original `Mutex` object.Á,µ‰Ê ÊšZ ¢""Ë%@ &á  ˆüPwTµ¹¼×ZÝZ_ ¾‰_
c¢×ZÝZö »‰ü„tüõ‰FC Makes a new `MappedMutexGuard` for a component of the locked data.ÁÀŠËüÈŠ96 This operation cannot fail as the `MutexGuard` passedÁü†‹  in already locked the mutex.Á«‹Ëü³‹30 This is an associated function that needs to beÁüë‹LI used as `MutexGuard::map(...)`. A method would interfere with methods ofÁü¼Œ52 the same name on the contents of the locked data.ÁšZèïïIó@ ôá  õ
 ì2ò<âª}A¢×Zà_àeèfef_ªâú› ©â«› šË«› ËÝZÄßË«›Ýœ Ëú›
d¢×ZÝZú›«›ö þ ¦ˆŠüÊ“ŽüæDA Attempts to make a new `MappedMutexGuard` for a component of theÁü¯NK locked data. The original guard is returned if the closure returns `None`.Á‚‘ËüŠ‘9Ê—üÈ‘ ˜í‘Ëüõ‘3Øü­PM used as `MutexGuard::try_map(...)`. A method would interfere with methods ofÁü‚“5Ö™<Ñ“šZ«›ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶°›šZ_àhèihi_©œ Ù“»œ ä“Ì«› ÌÝZü·” Ì«›÷¡ø°ú°û°Ðü°ý°þ°ìHˈXêE> Ìú›tÉ”
g¢×ZÝZú›«›ö ç“þ ð“ÉËÍÏü¯›·üŸ—Dîœüè—MJ locked data. The original guard is returned alongside arbitrary user dataÁüº˜! if the closure returns `Err`.Áà˜Ëüè˜9Ê—ü¦™ ˜Ë™ËüÓ™3Øü‹šWT used as `MutexGuard::try_map_or_err(...)`. A method would interfere with methods ofÁüçš5Ö™t¶›šZ«›ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶°›šZ¯_àkèl¯mlmk_©œ Å›»œ Л©âþ¦ ӛͫ› ÍÝZüœ#Í«›î§ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ Íú›þ¦ŒÔœ
j¢×ZÝZú›«›þ¦ö ß›þ ð›íïñóìîü¡¡Rü²Ÿ@= Temporarily unlocks the mutex to execute the given function.Á÷ŸËüÿŸDA This is safe because `&mut` guarantees that there exist no otherÁüÈ 2/ references to the data protected by the mutex.ÁR|¡D¨¡Î ΚZèà_èoàppo º¡_©âï« ±¡©âô« ´¡ï«lå¡ï«ô« ñ¡
n¢×ZÝZï«ô«ö ·¡þ Å¡lngiüà¤!ü©£EB Leaks the mutex guard and returns a mutable reference to the dataÁÜó£ protected by the mutex.Á“¤Ëü›¤2/ This will leave the `Mutex` in a locked state.Á$礚Z ¢ÝZ__
q¢×ZÝZö ì¤üä¥C¢sÌ tustuÑ“ í¥â“ ƒ¦×Zd𥒔ÿ¥±”¦šZvwzé¥?AsEGsÜȬü®¦30 Unlocks the mutex using a fair unlock protocol.Áæ¦Ëüî¦JG By default, mutexes are unfair and allow the current thread to re-lockÁü½§HE the mutex before another has the chance to acquire the lock, even ifÁüЍJG that thread has been blocked on the mutex for a long time. This is theÁüÙ¨KH default because it allows much higher throughput as it avoids forcing aÁü©©GD context switch on every mutex unlock. This can result in one threadÁüõ©96 acquiring a mutex many more times than other threads.Á³ªËü»ªLI However in some cases it can be beneficial to ensure fairness by forcingÁüŒ«LI the lock to pass on to a waiting thread if there is one. This is done byÁüÝ«DA using this method instead of dropping the `MutexGuard` normally.ÁR|´¬\ϬšZrr
v¢×ZÝZö Û¬üµ°Wü‚®@â¨Ç®ËüÏ®74 The mutex is unlocked using a fair unlock protocol.Á‹¯Ëü“¯D¸©üܯ2†ªR|¡°l¼°Ï ÏšZï«ô«rèxàyyx Ó°r¨¬ ʰº¬ Ͱ̬lþ°à¬ б
w¢×ZÝZï«ô«ö аþ Þ°JLNPÌý´üDzE¨É‘³Ëü™³LÊüê³LÖÊÜ»´ªËR|é´$„µÐ КZr Œµr
ËÎË ËÏû ËП
\’ËÑŸ
ËÑq$¹É,ËÔ¶lT¿Ç.ËÕÍÐÁ]ËÖ˲Ë×˲ŠË×ý²òÕËØ NonZeroUsizeÁd€º’ËÙ,—ìËÚb\±®¸ËÜÕдËÝüÑOJM<?.1 #ü¦¤
øúçéœÙÙ¯±Œû–T’,vxdfä€
ü€41 Helper trait which returns a non-zero thread ID.ÁµËü¹JG The simplest way to implement this trait is to return the address of aÁÔ„ thread-local variable.ÁŸË¯µ°Ëü´NK Implementations of this trait must ensure that no two active threads shareÁüƒ IF the same thread ID. However the ID of a thread that has exited can beÁüÍ 2/ re-used since that thread is no longer active.Á£DÞÞ„¸ü€
ÓÞ„¸„¸ ßàßàà„¯ ”£
 Initial value.Á$µ ÞÞŒ¸ü¥
,üÆ GD Returns a non-zero thread ID which identifies the current thread ofÁt
 execution.ÁŒ¨
æ æŒ¸£ £ ¤ Ϧ ì ™‘‹ÖqËîÕrÞ º
Þ
àŒ¸
ü‰"üÕ
HE A raw mutex type that wraps another raw mutex to provide reentrancy.ÁžËü¢IF Although this has the same methods as the [`RawMutex`] trait, it doesÁüìHE not implement it, and should not be used in the same way, since thisÁüµLI mutex can successfully acquire a lock multiple times in the same thread.Áü‚GD Only use this when you know you want a raw mutex that can be lockedÁüÊ>; reentrantly; you probably want [`ReentrantMutex`] instead.ÁµDÌ â¥ãâãôØ ¦©â‚] ©®\XÊ9WN<¶ äåæç24/1”²ËááËt¼ÊËááuDçËáá³Y„õËáá‚]üŠWÌ é¥êéêôØ †ø ª¯ÚD™½ÚÞ‚]¨â]®\>@CEüåWÌ ì¥ííìôØ ñ†ø ¯Ú»Û$ÿ‡ú‚]$–®\68;=üÁ9Ì ï¥ðïðôØ Æ†ø Ó¯Ú‡ú®\ñòôöøùú469;¤ãü(ü·îî®\ü¦AËç ç®\èîèóó Ìî©âœý ·œý„ºœý
ò³Y‚]œýŸ IK”’ü¾A> Acquires this mutex, blocking if it's held by another thread.Á$™è è®\î žî
ô³Y‚]Âô<closure_kind>Áõ<closure_signature>Áõ<upvars>Áõõôõ³Y‚] ®\ô©üŽC¡»üÖ@í»é é®\î ¹î
ö³Y‚]åöéþ÷‚ÿ÷ ÿ÷÷ö÷³Y‚]̀׀ܑ!üŠ>; Unlocks this mutex. The inner mutex may not be unlocked ifÁüÍ=: this mutex was acquired previously in the current thread.Á Ëd— ¯µ¨ Ëü° NK This method may only be called if the mutex is held by the current thread.Á4Ÿ!ê ê®\î ¦!î
ø³Y‚]$§!ü×#ü“#1ÇÁLÞ#ë ë®\î è#î
ù³Y‚]$é#üû$0ü£$EB Checks whether the mutex is currently held by the current thread.ÁÔ‚%ì ì®\î %î
ú³Y]$ž%ü§&=Ì ü¥ýýüôØ ¬&†ø ½&¸d¯&‡ú\À&®\þÿ%'*,ü—) üë&DA Unlocks this mutex using a fair unlock protocol. The inner mutexÁü´'DA may not be unlocked if this mutex was acquired previously in theÁœý' current thread.Á•(Ëd(¯µ®(Ëü¶(Nï‚\¥)í í®\û ±)û
þ³Y‚]$²)̹.ü£+E¨Éí+Ëüõ+LÊüÆ,LÖÊÜ—-ªË·-Ëd¿-¯µÐ-ËüØ-Nï‚$Ç.î î®\û Ì.û
ÿ³Y]$Í.ü™1>Ì ¥ôØ ž1†ø °1»„l¡1‡ú\³1®\ƒ%'*,ü®29üÞ1=‰Ñtµ2ï ï®\ĉ Ä2
ƒ³Y]$Å2™Ò<Ë2…3ƒéþ‚ÿ ÿƒ³Y‚]Í€Ù€ĉü‡48ü·3=‰ÑdŽ4ð ð®\ ›4
³Y]$œ4™Ò<¢4Ý4éþ‚ÿ ÿ³Y‚]Í€Ù€üÖ8*ü‹5?< A mutex which can be recursively locked by a single thread.ÁË5ËüÏ5FC This type is identical to `Mutex` except for t
Ëÿ îñ³Y‚]ÝZ¡ ˆL¡
¥³Y‚]ÝZ$‰Lü±R6ü¥MLI Acquires a reentrant mutex, blocking the current thread until it is ableÁlöM
to do so.ÁˆNËüNLI If the mutex is held by another thread then this function will block theÁüáNLI local thread until it is available to acquire the mutex. If the mutex isÁü²OLI already held by the current thread then this function will increment theÁüƒP@= lock reference count and return immediately. Upon returning,ÁüÈPGD the thread is the only thread with the mutex held. An RAII guard isÁü”QKH returned to allow scoped unlock of the lock. When the guard goes out ofÁüäQ&# scope, the mutex will be unlocked.ÁR|R$¸Rò òš]ööÖIûçËü
Ëÿ îò³Y‚]ÝZ¡ ½R¡
¦³Y‚]ÝZ$¾RüªVBüïS"£ì–TËüžTLÙìüïTL®í¬ÀU‚îÚUËüâU!«îR|–VD±Vó óš]ø°ú°û°Ðü°ý°þ°ìHˈXêE>ööÖIûçËü
Ëÿ îó³Y‚]ÝZ¡ ºV¡
§³Y‚]ÝZ$»Vü¯Z#ü¶X7ºðòXËüúXTQ Since this call borrows the `ReentrantMutex` mutably, no actual locking needs toÁüÓYIÙñ<¶Zô ôš] ôÝZ¡ ¾Z¡
¨³Y‚]ÝZ$ÃZüá[ü‰[1ÇÁR|Í[Lè[õ õš]¡ ò[¡
©³Y‚]ÝZ$ó[ü—]0ü«\E†…R|ƒ]Ôž]ö öš]¡ ¹]¡
ª³Y‚]ÝZ$º]ü—b!üƒ^öó§^Ëü¯^J©ôüþ^OL the need to maintain a `ReentrantMutexGuard` object alive, for example whenÁ¬Ò_Êõì_Ëdô_¯µ…`Ëü`JŠöüÜ`NK `ReentrantMutexGuard` but that guard has be discarded using `mem::forget`.Áü¯aA­÷R|ƒbd¥b÷ ÷š]¡ ²b¡
«³Y‚]ÝZ$³bôáeüáb,Ôø’cËüšcK”ùüêc=èù¬dËd´d¯µÅdËüÍdCÐúü•e96 still holding a reference to a `ReentrantMutexGuard`.Áïeø øš] ø³Y¡ óe¡
¬³Y‚]ÝZ$ôeüÅj ü¥f1¶üÛfËüãfJ©ôü²gJG the need to maintain a `ReentrantMutexGuard` object alive, for exampleÁÔh when dealing with FFI.Á hËd¨h¯µ¹hËüÁhGÃýüiHE returned pointer, for example if the current thread logically owns aÁüÚiA> `ReentrantMutexGuard` but that guard has been discarded usingÁ” j `mem::forget`.ÁDÌjù ùš] ÝZ¡ Õj¡
­³Y]ÝZ$ÖjüäxHÌ ¯¥°±¯°±ôØ éx†ø úxâ“ Šy¸dìx‡ú\ýxš]²*,/146üä}&ü³y<ó€ôyËüüyJ©ôüËzOΰ¬Ÿ{Êõ¹{ËdÁ{¯µÒ{ËüÚ{JŠöü©|Ná±üü|A­÷R|Ð}Œò}ú úš]® „~®
²³Y‚]ÝZ$…~ü¶~IÌ ´¥µ´µôØ »~†ø Í~â“ Ý~»„l¾~‡ú\Ð~š]·¸-/2479ü¼\ü†=‰ÑÈËüÐFü›€Kß„üë€*³…R|¨û ûš]ø°ú°û°Ðü°ý°þ°ìHˈXêE>ööÖIûçËü
Ëÿ îû³Y‚]ÝZ³ г
·³Y‚]ÝZ™Òü£†]üíƒ=‰Ñ¯„Ëü·„Fü‚…Kß„üÒ…*³…R|tª†ü üš]ĉø°ú°û°Ðü°ý°þ°ìHˈXêE>ööÖIûçËü
Ëÿ îü³Y‚]ÝZ³ ¹†³
¸³Y‚]ÝZ$º†™Ò<À†üΓZÌ º¥»¼º»¼ôØ Ó“†ø à“â“ ð“¯ÚDÖ“‡ú\ã“ÄÝZ<ü“š]½Å½GIKMOQü½”'<À”š]¹¹
½³Y‚]ÝZü •HÌ ¿¥ÀÁÁÀ¿ôØ ¥•†ø ²•½™ •¯ÚD¨•‡ú\µ•š]ÂüÂ79;=?Aüý•($€–ÝZš]¾¾
³Y‚]ÝZ׌ …–üЖ`Ì Ä¥ÅÆÆÄÅôØ Õ–†ø â–â“ ò–¯ÚDØ–‡ú\å–€ÃTþ–š]Çá`Ç@BDFHJü·—8º—ýþÿ ýš] þÁ`Á`œÃ`è Á]Ä`·ŽÁ]Ê­\É:•ÿÝà ¾—Ã
dzY‚]ÝZ$¿—þ Å—ÄÉ™ŒÐ™Ë^ÌTRèïÉ/*ËÈÈ^üó™%á`Ëü¯š8²š ^ Á`Á`œÃ`è Á]Ä`·ŽÁ]Ê­\É:•ÝÊ ¶šÊ
Ë$·šþ ½šü¿¦¢ÍÌ Î¥ÏÐÏÍÐÎ Ñ“ Ϧ©âû^ 親â_ „§ó“DÒ¦‚”$ݦ’”ä¦Þû^\ë¦û^$ù¦û^¢€§_$§_¢—§¹^˦šœÍ͘šÍüΧ`¢ÒÌ Ó¥ÔÕÓÒÔÕÑ“ ×§ìÌ é§ýÌ þ§ó“DÚ§’”å§©Í\ì§ÉÍú§èÍЍ¹^Ö×ÚÝáÓ§]_ÒdfÒkmÒüú¨7üµ¨@= Returns a reference to the original `ReentrantMutex` object.Á<©ƒ ƒ¹^ ¢î@ËŒá ËœM¸öq0.×Zû^_Ñ Œ©Ñ
Ö¢×Zû^_ö ‰©üû¬xüÑ©OL Makes a new `MappedReentrantMutexGuard` for a component of the locked data.Á¥ªËü­ªB? This operation cannot fail as the `ReentrantMutexGuard` passedÁüôª ˜™«Ëü¡«3ØüÙ«UR used as `ReentrantMutexGuard::map(...)`. A method would interfere with methods ofÁü³¬5Ö™‚­¹^èÿÿ«J@Ëá Ë
ËówñkŒhÄð¢×Zû^ô«ÑàØèÙØÙѪâô« †­©âòÔ ‘­òÔ _„â­òÔ®Ö ô«ð­
×¢×Zû^_ô«òÔö ”­þ ­ŒŽü賩üê¯NK Attempts to make a new `MappedReentrantMutexGuard` for a component of theÁü½°LI locked data. The original guard is return if the closure returns `None`.ÁޱËü–±BúÑüݱ ˜‚²Ëüв3Øü²YV used as `ReentrantMutexGuard::try_map(...)`. A method would interfere with methods ofÁü ³5Ö™<ï³¹^òÔê³í³î³Òï³ìð³ñ³ò³ìäs{©¶÷Ô¹^ÑàÛèÜÛÜÑúÕ ÷³ŒÖ ‚´òÔ _Äø´òÔäÛø°ú°û°Ðü°ý°þ°ìHˈXêE> ô«T†µ
Ú¢×Zû^_ô«òÔö Ž´þ Ÿ´ÌÎÐÒü¼»üá·NÃÖü´¸MÛ¢ü†¹!²£¬¹Ëü´¹BúÑüû¹ ˜ ºËü¨º3Øüàº`] used as `ReentrantMutexGuard::try_map_or_err(...)`. A method would interfere with methods ofÁüÅ»5Ö™t”¼¹^òÔê³í³î³Òï³ìð³ñ³ò³ìäs{©¶÷Ô¹^¯ÑàÞè߯àÞßàÑúÕ £¼ŒÖ ®¼©â’à ±¼òÔ _ܬ½òÔŠáê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ ô«’àlº½
Ý¢×Zû^_ô«òÔ’àö ½¼þ μðòôöïñüŒÂRüÀ@â¨âÀËüêÀD¸©ü³Á2†ªR|øÁD“ ¹^«›àÑèâàããâ ¥ÂÑ»œ œÂ©âè㠟«›lЫ›èã ÜÂ
á¢×Zû^_«›èãö ¢Âþ °ÂprkmüŸÄh¢åÌ æ¥çèçåæèÑ“ ¨ÄìÌ ¾ÄýÌ ÓÄ“°d«Ä’”ºÄ©Í\ÁÄÉÍÏÄèÍßĹ^éêí¤ÄWYå^`åegåܱËüŽÅ3ñ¯ÆÅËüÎÅJº°üÆHޱüêÆJà±ü¹ÇK´²ü‰ÈG‰³üÕÈ9Ú³“ÉËü›ÉL©´üìÉLÿ´ü½ÊMJ using this method instead of dropping the `ReentrantMutexGuard` normally.ÁR|Ë\¸Ë¹^ää
é¢×Zû^_ö ÄËü¢ÏWüõÌ@⨺ÍËüÂÍ1. The mutex is unlocked a fair unlock protocol.ÁøÍËü€ÎD¸©üÉÎ2†ªR|ŽÏl©Ïˆ ˆ¹^«›èãäèëàìëì ÀÏ仜 ·Ï«ä ºÏ½älëÏÑä ÷Ï
ê¢×Zû^_«›èãö ½Ïþ ËÏNPRTÌöÓüÀÑE¨ÉŠÒËü’ÒLÊüãÒLÖÊÜ´ÓªËR|âÓ$ýÓ ¹^ä …Ôä
í¢×Zû^_ö ‚Ôü—Õn¢ïÌ ð¥ñòòðïñÑ“  ÕìÌ ²ÕýÌ ÇÕó“D£Õ’”®Õ©Í\µÕÉÍÃÕèÍÓÕ¹^óôíîôœÕ`bïgiïnpï\ŒÖ4‘Öîî_¬¯Ö,²ÖРй^ Š_î ¸Öî
ô¢×Zû^_$¹ÖüýÖm¢öÌ ÷¥øùöù÷øÑ“ †×ìÌ ˜×ýÌ ­×ó“D‰×’””שÍ\›×ÉÍ©×è͹׹^ú ú‚×Y[ö`bögiö”ÿ×$‚Ø ¹^õ ‡Øõ
ú¢×Zû^_$ŒØüŸÙ¢üÌ ý¥þÿÿýþü Ñ“ ¨ÙìÌ ºÙýÌ ÏÙó“D«Ù’”¶Ù©Í\½ÙÉÍËÙà`_TÒÙèÍèÙ¹^€á`¤Ùiküprüwyüü¦Ú8©ÚŒ
blocking.ÁÎFËdÖF¯µçFËüïFXÕØ\ÖG Œ¸â âGâ
猸$ãGüÑHGüõGLI Additional methods for `RwLock`s which support upgradable locks and fairÁtÂH unlocking.ÁWEè脸üÑHÞ⌸„øHÎŒ¸l‹I脸:Åß.Õß$„¸LÅß@ÕßêéêêéüßJ(üŸI=: Releases an upgradable lock using a fair unlock protocol.ÁáIËdéI¯µúIËü‚JXÕØ´éJ· ·Œ¸è €Kè
錸$Kü¾N üKNK Temporarily yields an upgradable lock to a waiting thread if there is one.ÁàKËüèKWT This method is functionally equivalent to calling `unlock_upgradable_fair` followedÁüÄLWT by `lock_upgradable`, however it can be much more efficient in the case where thereÁÜ MªËÀMËdÈM¯µÙMËüáMXÕØ|ÈN¸ ¸Œ¸è ØNè
ꌸ$ÙNüPQü±OLI Additional methods for `RwLock`s which support upgradable locks and lockÁ„þO
downgrading.ÁiEë넸üÅß„»PÓŒ¸”ÎP넸2Åß.Îæ$„¸DÅß@ÎæíìíìíüR&üçP30 Downgrades an upgradable lock to a shared lock.ÁŸQËd§Q¯µ¸QËüÀQXÕØ¤§R¹ ¹Œ¸ë ¼Rë
쌸$½Rü‚T)üÉR74 Downgrades an exclusive lock to an upgradable lock.Á…SËdS¯µžSËü¦SW¹ª¼ŒTº ºŒ¸ë ¤Të
팸$¥Tü’UIü¯TOL Additional methods for `RwLock`s which support upgradable locks and lockingÁ”ÿT with timeouts.Á{Eîü’UÒÅß„ºUöÎtÍU*Åß&öÎ$„¸<Åß8öÎðñòïðñòñïðòü­VCüâUFC Attempts to acquire an upgradable lock until a timeout is reached.Á¼°V» »Œ¸‘Áî ÈVî
$ÉV™Ò<ÏVüÁWDüöVFÃëÌÄW¼ ¼Œ¸°Áî ÞWî
ðŒ¸$ßW™Ò<åWüñYBü‹XGD Attempts to upgrade an upgradable lock to an exclusive lock until aÁ¼×X timeout is reached.ÁóXËdûX¯µŒYËü”YXÕØ|ûY½ ½Œ¸‘Áî ‹Zî
ñŒ¸$ŒZ™Ò<’ZüŸ\Cü¹ZGåí¼…[´î¡[Ëd©[¯µº[ËüÂ[XÕØŒ©\¾ ¾Œ¸°Áî »\î
òŒ¸$¼\™Ò<Â\üŸbÄæ\ A reader-writer lockÁÿ\Ëüƒ]MJ This type of lock allows a number of readers or at most one writer at anyÁüÑ]OL point in time. The write portion of this lock typically allows modificationÁü¡^OL of the underlying data (exclusive access) and the read portion of this lockÁüñ^:7 typically allows for read-only access (shared access).Á¬_Ëü°_MJ The type parameter `T` represents the data that this lock protects. It isÁüþ_PM required that `T` satisfies `Send` to be shared across threads and `Sync` toÁüÏ`NK allow concurrent access through readers. The RAII guards returned from theÁüžaNK locking methods implement `Deref` (and `DerefMut` for the `write` methods)Áüía1. to allow access to the contained of the lock.ÁEÌ ôõôõôØ ±b„Ù ´b¹`+$BZ[eö÷&(+-4ÅbÅb»óó³YœÑb$Ñb»óó¬müßgHÌ ùúúùôØ ëg„Ù €hóYLîg½Ú$úgÍÚ$Œh¹`.035ü«hOÌ üýüýôØ ·h„Ù ÌhƒúLºh»Û$ÆhÍÚ$Øh¹Y$ßh¹`68;=üÿh"Ì ÿÿôØ „i Ü ’iƒúL‡i¹`"$üúi(ü¨i?< Creates a new instance of an `RwLock<T>` which is unlocked.Á‡j¹Y¹`þ
»üUfÏÏH俳Y¹Yˆ ¥vˆ
³Y¹Y$¦vü¥zMüµwIÙ‚ƒxËd‹x¯µœxËü¤xOL This method must only be called if the thread logically holds a write lock.ÁøxËü€y^£äüãy/ŠåÔ³zÀ À¹`Æ%»
»÷ŽÜsjhÀ³Y¹Yˆ Îzˆ
Œ³Y¹Y$ÏzüÍ€/üà{LI Locks this `RwLock` with shared read access, blocking the current threadÁì±| until it can be acquired.ÁÓ|ËüÛ|LI The calling thread will be blocked until there are no more writers whichÁü¬}LI hold the lock. There may be other readers currently inside the lock whenÁÄý} this method returns.Áš~Ëü¢~LI Note that attempts to recursively acquire a read lock on a `RwLock` whenÁüó~B? the current thread already holds one may result in a deadlock.ÁºËüÂHE Returns an RAII guard which will release this thread's shared accessÁ¼ once it is dropped.ÁR|¹€$Ô€Á Á¹`Æ%»Œ
»üUfÏÏHäÁ³Y¹Yˆ Ù€ˆ
³Y¹Y$Ú€üë„;ü>; Attempts to acquire this `RwLock` with shared read access.ÁÓ‚ËüÛ‚MJ If the access could not be granted at this time, then `None` is returned.Áü­ƒMJ Otherwise, an RAII guard is returned which will release the shared accessÁ¼ÿƒ when it is dropped.Á›„Ëü£„!«îR|ׄDò„ ¹`ø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»Œ
»üUfÏÏHä³Y¹Yˆ û„ˆ
޳Y¹Y$ü„üŠ1üü†IF Locks this `RwLock` with exclusive write access, blocking the currentÁüʇ$! thread until it can be acquired.Áó‡Ëüû‡FC This function will not return while other writers or other readersÁüƈ&# currently have access to the lock.ÁñˆËüùˆKH Returns an RAII guard which will drop the write access of this `RwLock`ÁŒÉ‰ when dropped.ÁR|í‰,ˆŠÃ ù`Æ%»
»÷ŽÜsjhóY¹Yˆ ŽŠˆ
³Y¹Y$ŠüœŽ=üÊ‹?< Attempts to lock this `RwLock` with exclusive write access.ÁŽŒËü–ŒLÙìüçŒIF Otherwise, an RAII guard is returned which will release the lock whenÁ”µ it is dropped.ÁÌËüÔ!«îR|ˆŽL£ŽÄ Ĺ`ø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»
»÷ŽÜsjhijY¹Yˆ ­Žˆ
³Y¹Y$®Žü¤’#ü³7ºðïËü÷LI Since this call borrows the `RwLock` mutably, no actual locking needs toÁüÈ‘IÙñ<«’ŠŹ` ŹYˆ ³’ˆ
³Y¹Y$¸’üå“üþ’@= Checks whether this `RwLock` is currently locked in any way.ÁR|Ñ“Lì“Æ ƹ`ˆ ö“ˆ
³Y¹Y$÷“ü‘•)ü¯”;‹­R|ý”œ˜•Ç Ç¹`ˆ ¬•ˆ
³Y¹Y$­•üˆš&üï•! Forcibly unlocks a read lock.Á•–ËüJ©ôüì–KH the need to maintain a `RwLockReadGuard` object alive, for example whenÁ¬¼—ÊõÖ—ËdÞ—¯µï—Ëü÷—JŠöüƘJG `RwLockReadGuard` but that guard has be discarded using `mem::forget`.Áü•™LI Behavior is undefined if a rwlock is read-unlocked when not read-locked.ÁR|ô™Œ–šÈ ȹ`ˆ ¨šˆ
³Y¹Y$©šüüž'üÞš" Forcibly unlocks a write lock.Á…›ËüJ©ôüÜ›LI the need to maintain a `RwLockWriteGuard` object alive, for example whenÁ¬­œÊõÇœËdÏœ¯µàœËüèœJŠöü·KH `RwLockWriteGuard` but that guard has be discarded using `mem::forget`.Áü‡žNK Behavior is undefined if a rwlock is write-unlocked when not write-locked.ÁR|èž”ŠŸÉ É¹`ˆ Ÿˆ
³Y¹Y$žŸôà¢üÖŸ96 Returns the underlying raw reader-writer lock object.Á” Ëüœ LI Note that you will most likely need to import the `RawRwLock` trait fromÁüí 63 `lock_api` to be able to call functions on the rawÁ¼¨¡ reader-writer lock.ÁÄ¡ËdÌ¡¯µÝ¡Ëüå¡CÐúü­¢.+ still holding a reference to a lock guard.Áî¢Ê ʹ` ʳYˆ ò¢ˆ
³Y¹Y$ó¢üâ§ üž£1¶üÔ£ËüÜ£J©ôü«¤IF the need to maintain a `RwLockReadGuard` or `RwLockWriteGuard` objectÁüù¤-* alive, for example when dealing with FFI.Á«¥Ëd³¥¯µÄ¥ËüÌ¥GÃýü˜¦Hý¶üå¦MJ `RwLockReadGuard` or `RwLockWriteGuard` but that guard has been discardedÁÄ·§ using `mem::forget`.ÁDé§Ë ˹`Ö€ˆ ò§ˆ
³Y¹Y$ó§ü¾Ä.Ì ššôØ ÃĄ٠ÕÄγYlÆÄ¹`œ')+-ü©É+üóÄ>; Forcibly unlocks a read lock using a fair unlock protocol.Á¶ÅËü¾ÅJ©ôüÆK¨¡¬ÝÆÊõ÷ÆËdÿƯµÇËü˜ÇJŠöüçÇJ½¢ü¶ÈL‘£R|•É´·ÉÌ Ì¹`˜ Îɘ
³Y¹Y$ÏÉüÄÎ,ü‰Ê?< Forcibly unlocks a write lock using a fair unlock protocol.ÁÍÊËüÕÊJ©ôü¤ËL“¥¬õËÊõÌËd—̯µ¨ÌËü°ÌJŠöüÿÌK©¦üÏÍNþ¦R|°Î¼ÒÎÍ Í¹`˜ êΘ
œ³Y¹Y$ëÎü¦Ï/Ì žŸŸžôØ «Ï„Ù ¾ÏÕ³Yt®Ï¹` ¡¢£-/13üºÒUüÜÏMJ Attempts to acquire this `RwLock` with shared read access until a timeoutÁ|®Ð is reached.ÁÂÐËüÊÐGD If the access could not be granted before the timeout expires, thenÁü–ÑGD `None` is returned. Otherwise, an RAII guard is returned which willÁüâÑ1. release the shared access when it is dropped.ÁR|¦ÒdÁÒΠι`³YÖø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»Œ
»üUfÏÏHäγY¹Y ÎÒ
 ³Y¹Y$ÏÒ™Ò<ÕÒüÎ×VüðÔM®¶|ÂÕ„·ÖÕËüÞÕG©·üªÖGú·üöÖ1˸R|º×tÕ×Ï Ï¹`³Y×ø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»Œ
»üUfÏÏHäϳY¹Y ä×
¡³Y¹Y$å×™Ò<ë×üìÜWü‡ÚIF Attempts to acquire this `RwLock` with exclusive write access until aÁ¼ÕÚ´îñÚËüùÚG©·üÅÛGú·ü‘Ü41 release the exclusive access when it is dropped.ÁR|ØÜlóÜРй`°ºø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»
»÷ŽÜsjhгY¹Y Ý
¢³Y¹Y$‚Ý™Ò<ˆÝüâXü¨ßIÛ½¼öß´î’àËüšàG©·üæàGú·ü²á4ã¾R|ùá|”âÑ Ñ¹`ƒ½ø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»
»÷ŽÜsjhѳY¹Y ¤â
£³Y¹Y$¥â™Ò<«âüû3Ì ¥¦¥¦ôØ •û„Ù ¬ûܳY”˜û¹`§¨')+-üð9üÊûLŠì›üÕŠ½üËüÅüL†‹ü–ýLÛ‹Äçý¯Œ„þËüŒþKH Unlike `read`, this method is guaranteed to succeed without blocking ifÁüÜþK‹Çü¬ÿGßÇüøÿJ¯ÈŒÇ€ÉÝ€Ëüå€H†Ž¼²׎R|ÜÒ Ò¹`Æ%»Œ
»üUfÏÏHäÒ³Y¹Y¤ †‚¤
§³Y¹Y$‡‚ü͇Eüǃ>£Š„Ëü’„M÷üä„MΑ¼¶…¤’Ò…ËüÚ…LI This method is guaranteed to succeed if another read lock is held at theÁü«†MJ time of the call. See the documentation for `read_recursive` for details.Áý†Ëü…‡!«îR|¹‡”Ô‡Ó Ó¹`ø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»Œ
»üUfÏÏHäÓ³Y¹Y¤ 燤
¨³Y¹Y$è‡ü·“8Ì ª««ªôØ ¼“„٠ؓ߳Y¼¿“¹`¬­')+-ü˜˜vüö“M®¶|È”„·Ü”Ëüä”G©·ü°•Gú·üü•1˸²–Ëüº–IF This method is guaranteed to succeed without blocking if another readÁüˆ—C@ lock is held at the time of the call. See the documentation forÁüЗ! `read_recursive` for details.ÁR|„˜´Ÿ˜Ô Ô¹`°ºø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»Œ
»üUfÏÏHäÔ³Y¹Y© ¿˜©
¬³Y¹Y$À˜™Ò<Θü×wüùšM®¶|Ë›„·ß›Ëüç›G©·ü³œGú·üÿœ1˸R|ÃÄÞÕ Õ¹`ƒ½ø°ú°û°Ðü°ý°þ°ìHˈXêE>Æ%»Œ
»üUfÏÏHäÕ³Y¹Y© €ž©
­³Y¹Y$ž™Ò<žüЬ1Ì ¯°¯°ôØ ¬„Ù ¤¬â³Y„’¬¹`±²³*,.0üŒ°[ü¬SP Creates a new `RwLockUpgradableReadGuard` without checking if the lock is held.Áš­Ëd¢­¯µ³­Ëü»­ZW This method must only be called if the thread logically holds an upgradable read lock.Áš®Ëü¢®]¯„ü„¯Y•…¼â¯ö…üš°Ö Ö¹`÷KÆ%»œ
»6Eô6óöÖ³Y¹Y® º°®
±³Y¹Y$»°üɵDüÞ±PM Locks this `RwLock` with upgradable read access, blocking the current threadÁì³²ÕŠÕ²ËüݲOL The calling thread will be blocked until there are no more writers or otherÁü±³NK upgradable reads which hold the lock. There may be other readers currentlyÁü„´-* inside the lock when this method returns.Á¶´Ëü¾´H†Ž¼‹µ׎R|µµ|е× ×¹`÷KÆ%»œ
»6Eô6óö׳Y¹Y® ൮
²³Y¹Y$áµüŠºPü«·B? Attempts to acquire this `RwLock` with upgradable read access.Áò·Ëüú·M÷ü̸MΑ¼ž¹¤’º¹Ëü¹!«îR|ö¹œ‘ºØ ع`ø°ú°û°Ðü°ý°þ°ìHˈXêE>÷KÆ%»œ
»6Eô6óöسY¹Y® ¥º®
³³Y¹Y$¦ºüˆÌ6Ì µµôØ Ì„Ù §Ìî³Y¬Ì¹`·¸')+-ü§ÏüÅÌQN Attempts to acquire this `RwLock` with upgradable read access until a timeoutÁ|›Í„·¯ÍËü·ÍG©·üƒÎGú·üÏÎ1˸R|“ϼ®ÏÙ Ù¹`°ºø°ú°û°Ðü°ý°þ°ìHˈXêE>÷KÆ%»œ
»6Eô6óöÙ³Y¹Y´ ÏÏ´
·³Y¹Y$ÐÏ™Ò<ÞÏüõÔü“ÒQàà|éÒ„·ýÒËü…ÓG©·üÑÓGú·üÔ1˸R|áÔÌüÔÚ Ú¹`ƒ½ø°ú°û°Ðü°ý°þ°ìHˈXêE>÷KÆ%»œ
»6Eô6óöÚ³Y¹Y´ ŸÕ´
¸³Y¹Y$ Õ™Ò<®Õü×ã@Ì º»º»ôØ Üã„Ù êãƒúLßãÄ‹<öã¹`¼Å¼.024ä¬ä<¯ä¹`¹¹
¼³Y¹Yüüä.Ì ¾¿¾¿ôØ å Ü åƒúL„å¹`ÀüÀ%')+ì¿å$Âå¹Y¹`½½
À³Y¹Y׌ ÇåüÿåFÌ ÂÃÂÃôØ „æ„Ù ’æƒúL‡æ ŽTžæ¹`Äá`Ä.024üÌæ8ÏæÛÜÝ Û¹` ÜÁ`Á`œÃ`è Á]Ä`·ŽÁ]Ê­\É:•ÝÝÁ ÓæÁ
ijY¹Y$Ôæþ Úæü¶ìU8ÞÌ ÆÇÆÞÇÑ“ Âìâ“ ×ìÃ×ZLÅì‚”$Ñì¡”$Úì©a3579üíE¢ÉÌ ÊËÉÊËÑ“ ™íâ“ ¬í±íLœí’”¨í±”¸íôaÌÍÐÓוíBDÉIKÉü£î+üÜíB? Returns a reference to the original reader-writer lock object.Á4ªîß ßôa ¢óóö@»÷á »+$BZ[e×ZÝZÈ ´îÈ
Ì¢×ZÝZö ±îü‰òqüíîJG Make a new `MappedRwLockReadGuard` for a component of the locked data.Á¼ïËüÄï>; This operation cannot fail as the `RwLockReadGuard` passedÁü‡ð in already locked the data.Á«ðËü³ð3ØüëðQN used as `RwLockReadGuard::map(...)`. A method would interfere with methods ofÁüÁñ5Ö™òôa«›££ÞL§@»¨á »©
»èkˆÂ¿ m¢×Zú›ÈàÎèÏÎÏÈ©œ ”ò»œ Ÿòà«› àÝZ„éòà«›¤õ àú›÷ò
Í¢×ZÝZú›«›ö ¢òþ «òüÚøüëôJG Attempts to make a new `MappedRwLockReadGuard` for a component of theÁüºõJG locked data. Returns the original guard if the closure returns `None`.Á‰öËü‘ö>õðüÔö½ñøöËü€÷3Øü¸÷UR used as `RwLockReadGuard::try_map(...)`. A method would interfere with methods ofÁü’ø5Ö™<áøôa«›ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶‚ôôaÈàÑèÒÑÒÈ©œ éø»œ ôøá«› áÝZÄÌùá«›Ìúø°ú°û°Ðü°ý°þ°ìHˈXêE> áú›TÚù
Т×ZÝZú›«›ö ÷øþ €ùÉËÍÏü΀´ü¯üJ¶õüþüMÛ¢üÐý!²£öýËüþý>õðüÁþ½ñåþËüíþ3Øü¥ÿ\Y used as `RwLockReadGuard::try_map_or_err(...)`. A method would interfere with methods ofÁü†€5Ö™tÕ€ôa«›ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶‚ôôaþ¦ÈàÔèÕ¯ÖÔÕÖÈ©œ 䀻œ ï€̧ ò€â«› âÝZÜæâ«›ßÿê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ âú›þ¦
Ó¢×ZÝZú›«›þ¦ö þ€þ äæèêìîüƆRüÑ„C@ Temporarily unlocks the `RwLock` to execute the given function.Á™…Ëü¡…D¸©üê…52 references to the data protected by the `RwLock`.ÁR|²†D͆ã ãôaï«ô«ÈèØàÙÙØ ߆Ȩ¬ Ö†º¬ Ù†̬lЇà¬ –‡
×¢×ZÝZï«ô«ö ܆þ ê†KMOQüçˆI¢ÛÌ ÜÝÝÛÜÑ“ ðˆâ“ ‡‰Î×Zlóˆ’”ƒ‰±”“‰ôaÞßâìˆCEÛJLÛÜåü·‰63 Unlocks the `RwLock` using a fair unlock protocol.Áò‰Ëüú‰JG By default, `RwLock` is unfair and allow the current thread to re-lockÁüÉŠKH the `RwLock` before another has the chance to acquire the lock, even ifÁü™‹IF that thread has been blocked on the `RwLock` for a long time. This isÁüç‹EB the default because it allows much higher throughput as it avoidsÁü±ŒMJ forcing a context switch on every `RwLock` unlock. This can result in oneÁüƒC@ thread acquiring a `RwLock` many more times than other threads.ÁËËüÓL©´ü¤ŽLÿ´üõŽIF using this method instead of dropping the `RwLockReadGuard` normally.ÁR|ÑôaÚÚ
Þ¢×ZÝZö øüè“Wü²‘CÓ€ú‘Ëü‚’41 The `RwLock` is unlocked a fair unlock protocol.Á»’ËüÃ’D¸©üŒ“5ºR|Ô“lï“ä äôaï«ô«Úèààáàá †”Ú¨¬ ý“º¬ €”̬l±”ଠ½”
ߢ×ZÝZï«ô«ö ƒ”þ ‘”KMOQÌΘü•–HE Temporarily yields the `RwLock` to a waiting thread if there is one.Áâ–Ëüê–LÊü»—LI by `read`, however it can be much more efficient in the case where thereÁÜŒ˜ªËR|º˜$Õ˜å åôaÚ ݘÚ
â¢×ZÝZö Ú˜üø™O¢äÌ åæåæäÑ“ šâ“ ”š±íL„š’”š±” šôaçèíîèý™EGäLNä\Κ4ÓšããÝZ¬ñš,ôšæ æôa æÝZã úšã
è¢×ZÝZ$ûšü¾›N¢êÌ ëìëêìÑ“ Ǜⓠڛ±íLÊ›’”Ö›±”æ›ô
»ã/S!&”p¢×Zú›ûàèû©œ °Ë»œ »Ëð«› ðÝZĆÌð«›½¢ ðú›4˜Ì
¢×ZÝZú›«›ö ¾Ëþ ÇËü‰Òü•ÎKH Attempts to make a new `MappedRwLockWriteGuard` for a component of theÁüåÎL›×¶ÏËü¾Ï?§žü‚нñ¦ÐËü®Ð3ØüæÐVS used as `RwLockWriteGuard::try_map(...)`. A method would interfere with methods ofÁüÁÑ5Ö™<Ò©c«›ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶›¡©cûàèû©œ ˜Ò»œ £Òñ«› ñÝZüüÒ ñ«›¡§ø°ú°û°Ðü°ý°þ°ìHˈXêE> ñú›tŽÓ
ƒ¢×ZÝZú›«›ö ¦Òþ ¯ÒÊÌÎÐüŽÚ½üìÕKÏ¢ü¼ÖMÛ¢üŽ×!²£´×Ëü¼×?§žü€Ø½ñ¤ØËü¬Ø3ØüäØ]Z used as `RwLockWriteGuard::try_map_or_err(...)`. A method would interfere with methods ofÁüÆÙ5Ö™t•Ú©c«›ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶›¡©cþ¦ûà舯ˆû©œ ¤Ú»œ ¯Ú̧ ²Úò«› òÝZü§Û#ò«›¶¬ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ òú›þ¦Œ¹Û
¢×ZÝZú›«›þ¦ö ¾Úþ ÏÚåçéëíïü”àRüŸÞCÓ€çÞËüïÞD¸©ü¸ß5ºR|€àD›àó ó©cï«ô«ûèàŒŒ ­àû¨¬ ¤àº¬ §à̬lØàଠäà
Š¢×ZÝZï«ô«ö ªàþ ¸àKMOQü»âO¢ŽÌ ŽÑ“ Äââ“ àâÓ×Z”Çâ’”Üâ±”ìâ©c‘Àâ=?ŽDFŽüôå6ü‘ãLI Atomically downgrades a write lock into a read lock without allowing anyÁüâãA> writers to take exclusive access of the lock in the meantime.Á¨äËü°äIF Note that if there are any writers currently waiting to take the lockÁüþäIF then other readers may not be able to acquire the lock even if it wasÁ|Ìå downgraded.ÁR|àåLûå©côa
¢×ZÝZö …æüÎèV¢Ì Ñ“ ×èâ“ úèë×ZÌÚè’”öè±”†é©c–Óè=?DFüšìNü«éXU Atomically downgrades a write lock into an upgradable read lock without allowing anyÁüˆêA´±ÎêËüÖêI‹²ü¤ëIÞ²|òë°³R|†ì¼¡ì©cd
¢×ZÝZö ¹ìü¤ïJ¢˜Ì šš˜Ñ“ ­ïâ“ Äï—…l°ï’”Àï±”Ðï©c›œŸ©ï<>˜CE˜ܤöüõï6û„°ðËü¸ðJÇ…ü‡ñK›†ü×ñIð†ü¥òEÇüïòM’ˆüÁóC鈉ôËü‘ôL©´üâôLÿ´ü³õJG using this method instead of dropping the `RwLockWriteGuard` normally.ÁR|ö\«ö©c
¢×ZÝZö ·öü¯úWüù÷CÓ€ÁøËüÉø4¥‹‚ùËüŠùD¸©üÓù5ºR|›úl¶úô ô©cï«ô«èàžž Íú¨¬ Äúº¬ Çú̬løúଠ„û
œ¢×ZÝZï«ô«ö Êúþ ØúKMOQÌ¡ÿüçüHë´ýËü¼ýLÊüþMJ by `write`, however it can be much more efficient in the case where thereÁÜßþªËR|ÿ$¨ÿõ õ©c °ÿ
Ÿ¢×ZÝZö ­ÿüÓ€P¢¡Ì ¢££¡¢Ñ“ ܀ⓠíL߀’”뀱”û€©c¤¥íî¥Ø€EG
meantime.Á„âËüŒâI‹²üÚâIÞ²|¨ã°³R|¼ãL×ãdôaÑÑ
Õ¢×ZÝZö áãüøêKüÁæYV First, atomically upgrades an upgradable read lock lock into an exclusive write lock,ÁüŸç9þÑÝçËüåçTQ Then, calls the provided closure with an exclusive reference to the lock's data.Á¾èËüÆèLI Finally, atomically downgrades the lock back to an upgradable read lock.Áü—éA> The closure's return value is wrapped in `Some` and returned.ÁÝéËüåéHE This function only requires a mutable reference to the guard, unlikeÁü²ê-* `upgrade` which takes the guard by value.ÁR|äêlÿê d«›Ó?ÑÓ?×èØ×Ø ¬ëÑ©âðç뻜 ’ëƒ «› ƒ ÝZ¬•ëƒ «›Õèðç§ë
Ö¢×ZÝZðç«›$±ëþ ·ëz|~üáôWü’ð\Y First, tries to atomically upgrade an upgradable read lock into an exclusive write lock.ÁóðËüûðM÷ÍñËüÕñYV Otherwise, calls the provided closure with an exclusive reference to the lock's data,Áü³òDA and finally downgrades the lock back to an upgradable read lock.ÁüüòAàäÂóËüÊóH·åü—ô1. `try_upgrade` which takes the guard by value.ÁR|ÍôŒèô d«›ø°ú°û°Ðü°ý°þ°ìHˈXêE>ðçÑÓ?ÚèÛÛÚ ™õѪèúô»œ ÿô«› … ÝZ¬‚õ«›Éîðç”õ
Ù¢×ZÝZðç«›$žõþ ¤õz|~üÆú[¢ÝÌ ÞßÞÝßÑ“ Ïúâ“ îúî×Z¬Òú’”êú±”úúáËú@BÝGIÝüµýxü¨ûIF Tries to atomically upgrade an upgradable read lock into an exclusiveÁüöû+( write lock, until a timeout is reached.Á¦üËü®üG©·üúü" the current guard is returned.ÁR|¡ý|¼ýd×ZÖ„ÖÜÜ
à¢×ZÝZö Õý™Ò<æýüÀƒyü¥Iîïüó+Áð£‚Ëü«‚G©·ü÷‚"ñR|¬ƒŒÇƒd×ZׄÖÜÜ
á¢×ZÝZö ⃙Ò<óƒü±‡{¢ãÌ äåãåäÑ“ º‡â“ õ‡Œð¬½‡àµÌÕ‡’”ñ‡±”ˆé¶‡BDãIKãü¹ü³ˆIîïü+Áð±‰Ëü¹‰G©·¼…Š `None` is returned.Á¡ŠËü©ŠYçéü‡‹DÊêüЋAàä–ŒËüžŒH·åüëŒ52 `try_upgrade_for` which takes the guard by value.ÁR|¥¬Àˆ  ˆ dØò«›«íâÓ?çèèçè þâªèÖ»œ Û«› ‡ ÝZ¬Þ«›ðøðçð
æ¢×ZÝZðç«›$ƒŽ™Ò<‘Žþ ¯ŽˆŠüì˜üä“Iîïü²”+Áðâ”Ëüê”G©·¼¶•³õÒ•ËüÚ•Yçéü¸–DÊêüAàäÇ—ËüÏ—H·åüœ˜74 `try_upgrade_until` which takes the guard by value.ÁR|ؘ¼ó˜Š  Š dŠô«›«íâÓ?êèëêë ³™âªè‹™»œ «› ‰ ÝZ¬“™«›âüð祙
é¢×ZÝZðç«›$¸™™Ò<Æ™þ 㙈Šü˜Ÿ`¢íÌ îïíîïÑ“ ¡Ÿâ“ »Ÿ“Í„¤Ÿ’”·Ÿ±”ÇŸñíîñŸEGíLNí\ÿŸ4„ ììÝZ¬¢ ,¥    d ‹ ÝZì « ì
ñ¢×ZÝZ$¬ üï _¢óÌ ôõõóôÑ“ ø â“ ’¡“Í„û ’”Ž¡±”ž¡ öô >@óEGó”ã¡$桌  Œ dò ë¡ò
ö
 ì
 ½^HPbïA×ZÝZ!õ<wéþî‚ÿî ÿîîwî×ZÝZï«ô«ÐÏÝÏü¹ã7üðßKH An RAII mutex guard returned by `MutexGuard::map`, which can point to aÁü¼à# subfield of the protected data.ÁààËüäàOL The main difference between `MappedMutexGuard` and `MutexGuard` 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.ÁÆ4ßâ…ˤçâäßâüÝâ,üýâ;·Ë²E¢ðÌ ñòñòðÑ“ Ùãâ“ æãó“DÜã’”T÷ã±”ô™äœ[ì2ò<âª}Aóôõ¿ÕãOQSUN÷ã ïï ¢×Zd‡ä$‡ä ïïÕ¹‚4™ä ïïŠ˲Ñ{·Ë…YÚš¯ü–¥Jüª¢WT An RAII implementation of a "scoped lock" of a reentrant mutex. When this structureÁü‚£?< is dropped (falls out of scope), the lock will be unlocked.Á£ËüÆ£NøÉÜ•¤ `Deref` implementation.ÁÆ4³¤…ˤ»¤䳤ü±¤,üѤD4if unused the ReentrantMutex will immediately unlockÁÅE¢÷Ì ø¥ùúúøù÷Ñ“ ¹¥ìÌ Æ¥ýÌ Ö¥ó“D¼¥©Í\É¥’”üç¥$ÉÍ
è͹^ÿ îûüúµ¥cegikm]<ç¥ËööŠÑü‘¦)4‘¦ËööŠ˲Ñ{·Ë…YÚ ¢_ÍX!õ<áéþý‚ÿý ÿýýáý ×Zû^_«›èãÐÏ  ööÖIûçËü
Ëÿ î×Zû^_!õ<êéþþ‚ÿþ ÿþþêþ ×Zû^_«›èãÐÏ’Ýü¶PüÉýTQ An RAII mutex guard returned by `ReentrantMutexGuard::map`, which can point to aÁüžþ#õÐÂþËüÆþa^ The main difference between `MappedReentrantMutexGuard` and `ReentrantMutexGuard` is that theÁü¨ÿK‡ÒüôÿPÜÒ\Å€µÓÆ4Ó€…ˤۀäÓ€üÑ€,üñ€DªØ
ØE¢Ì ¥ƒƒÑ“ ßìÌ ìýÌ üó“©Í’”ü ÉÍ
èÍÔÇ‚¶_ówñkŒhÄð­ÛhjlnprbËÿÿ ¢ááä®Ëå»ËæÀ
ËçÕËXÊ9WN<¶ ×Zû^t³‚$³‚Ëÿÿ _æ4Ç‚ËÿÿŠ˲Ñ{·Ë…YÚ™Üü©ë7üöéHE RAII structure used to release the shared read access of a lock whenÁd¿ê dropped.ÁÆ4Îê…ˤÖêäÎêüÌê,üìê<,if unused the RwLock will immediately unlockÁ ëE¢ˆÌ ŠŠˆÑ“ Èëâ“ Öë±íLËë’”Äçë±” ôaüUfÏÏHäŒíÄëJLNPI4çë»ðü…ì,4…컊˲Ñ{·Ë…YÚ ¢ÝZû‰!õ<×éþ‚ÿ ÿ××ZÝZï«ô«ÐÏ  Æ%»Œ
»üUfÏÏHä×ZÝZ!õ<ßéþŽ‚ÿŽ ÿŽŽßŽ×ZÝZï«ô«ÐÏ€éü»Ä8ü„ÃLI RAII structure used to release the exclusive write access of a lock whenÁdÑãäÆ4àÅˤèÃäàÃüÞÃ,üþÃ<ØäþE¢Ì Ñ“ ÛÄâ“ éıíLÞÄ’”Äúı” ©c÷ŽÜsjh¯×ÄJLNPI4úÄ»ðü˜Å04˜Å»Š˲Ñ{·Ë…YÚš¯û‰!õ<Šéþ‚ÿ ÿŠ×ZÝZï«ô«ÐÏ  Æ%»
»÷ŽÜsjh×ZÝZ!õ<œéþ‚ÿ ÿœ×ZÝZï«ô«ÐÏÀîü°¼HüùºLI RAII structure used to release the upgradable read access of a lock whenÁdÆ»£äÆ4Õ»…ˤݻäÕ»üÓ»,üó»<ØäF¢˜Ì šš˜Ñ“ ټⓠܼ̈́’”Äÿ¼±” d6Eô6óöœöÕ¼JLNPI4ÿ¼»ðü½,4½»áç!õ<Ãéþ‚ÿ ÿÃ×ZÝZï«ô«ÐÏ  ÷KÆ%»œ
»6Eô6óö×ZÝZ!õ<Íéþž‚ÿž ÿžžÍž×ZÝZï«ô«ÐÏÕó!õ<ÖéþŸ‚ÿŸ ÿŸŸÖŸ×ZÝZðç«›ÐÏÕó! õ<Ùéþ ‚ÿ  ÿ  Ù ×ZÝZðç«›ÐÏÕó!!õ<æéþ¡‚ÿ¡ ÿ¡¡æ¡×ZÝZðç«›ÐÏÕó!"õ<ééþ¢‚ÿ¢ ÿ¢¢é¢×ZÝZðç«›ÐÏÕóüšœ=ü½˜TQ An RAII read lock guard returned by `RwLockReadGuard::map`, which can point to aÁü’™#õж™Ëüº™YV The main difference between `MappedRwLockReadGuard` and `RwLockReadGuard` is that theÁü”šK‡ÒüàšPÜÒ\±›µÓÆ4¿›…ˤǛ俛ü½›,üÝ›<Øä$F¢¤Ì ¥¦¥¤¦Ñ“ ¿œâ“ Íœ±íLœ’”TÞœ±”Ô‚‘eèkˆÂ¿ m§¨©¦»œOQSUNÞœ»££¬Ötîœ$££ ÝZ4‚»££Š˲Ñ{·Ë…YÚ‰èüåÉ>ü„ÆVS An RAII write lock guard returned by `RwLockWriteGuard::map`, which can point to aÁüÛÆ#õÐÿÆËüƒÇ[X The main difference between `MappedRwLockWriteGuard` and `RwLockWriteGuard` is that theÁüßÇK‡Òü«ÈPÜÒ\üÈµÓÆ4ŠÉ…ˤ’ÉäŠÉüˆÉ,ü¨É<Øä7F¢«Ì ¬­¬­«Ñ“ ‹Êâ“ ™Ê±íLŽÊ’”TªÊ±”ôÌÊ›fã/S!&”p®¯°Û‡ÊOQSUNªÊ»ªª¬ÖdºÊ$ºÊ»ªªÕ¹~4ÌÊ»ªªéÖ|]d^¢` /aƒd9fisi"4s'ûu,x1dy6Îy;-|@~EåJhO«ƒTà„Yà‡^ Šzdžzjo Æ|uÚ|{;‹ æ ¾”Ž Éœž•šŸQ¤©®³æ¡¸ õ»¿‰¼ÆË ýÒ×½Ù òêà Ãñç Çùîóøý’² ˜Š
¬Šý³ ð‹ „Œ(.41¿:@öÁFLÃR±ÄX^dj¬ÑpéÔv|׋׈ü׎‡Úš âݦ®ß¬õಸ È—ÀÜ—ÈÎ ÀšÖÔšÞä é­ì ÿ´ô ³½ü—ñ©÷èøú  ·Ú(ËÚ06 ªÜ>¾ÜF N V Ę^dùjp ©x£©Øõ ˆ«Žœ« ñœ¢ˆï¨Øî®´º³ìÀìÆÌ„éÒãçØÞäâê©áðþàö”àüËÝÝØÚ”× –Ö&ØÕ,óÔ28€Ñ>ÌÏD ÏJPøÌVýË\bhî¾nÕ»t°¹zƒ·¯µÏ´Œ¹³˜Õ±žì¯¤®ª°¸ª‹©¼ȦÂÈ¿£ÎÔÚàÁ›æìòø–”þ˜’P‘
¨Ž Ýæñæ ‚í(¤Œ. ðò6 Óù> íFL@~R»|X“{^˜zd<yj žrÖžzçw š ˆ® šÆ˜cvž ̦ ƒÓ® ®ÛÔm¼ÏfÂeÈedÎ_cÔdbÚaà í†èð³_ö ƈþÚˆ ^ J]ÀWtV œë&ãQ, ‰õ4ôN: åBÛIH š™P÷GVGF\LEbðCh ¬¤pÀ¤x›B~ •¦©¦Ž ï£ ˪ž ݲ¦°6¬µ5²Y4¸ ÎÂÀâÂÈ3Î ¬ÄÖÀÄÞ ÉÑæ ¶Øî Øàö!'ü& %Ä# ©ò½òo"$ ˆô,œô4-27BF_r«îû¡®³ÑäŒþƒˆ˜¤©®´ÈÚû¾ÈÑÜâ¹ÇexampleÁËextension traitsÁóËêûËË"ËêûË-RawMutexTimed::try_lock_untilÁ Ì
û ® RawMutex::unlockÁè
Ÿ Self::from_rawÁ ° RawMutex::lockÁRawMutex::try_lockÁRawMutexTimed::try_lock_forÁÕŽ ® è
û Ì