Files
boc/aamos-ledger-rust/target/debug/deps/libcrossbeam_utils-3fc97031a65be933.rmeta
T

747 lines
284 KiB
Plaintext
Raw Normal View History

rust
Dn#rustc 1.96.0 (ac68faa20 2026-05-25)ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8Á¤²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Á primitiveÁL¥
crossbeam_loomÁtestsÁ,³ impl_consumeÁd•윕켪ü”.µ Öcrossbeam_sanitize_threadÁÌæüÏ1üË6ü‹yü‡~«ââíÀÅhintÁçatomicÁ 
  
Õ seq_lockÁSeqLockÁ&º(æ (optimistic_readÁ(
validate_readÁ(writeÁSeqLockWriteGuardÁ-lockÁ-º02ã atomic_cellÁ4444444444 4
4 4 4
444
AtomicCellÁE¥E»4H¥4J¥4L¥4N¥4P¥Pæ P
into_innerÁP is_lock_freeÁPÈPswapÁPas_ptrÁ4X¥XtakeÁ4[¥[¬4^¥^compare_and_swapÁ^ ^¾b4d¥dã4Õ 4impl_arithmeticÁ4 i fetch_andÁi
fetch_nandÁifetch_orÁi fetch_xorÁ4
n¥n>4 q¥q÷4 t¥t×4
can_transmuteÁww4Ò zLENÁzzLOCKSÁ} } 4
AtomicUnitÁ
4
¬ÈÔ
¡4atomic_is_lock_freeÁ¥4¥4¥4 atomic_swapÁ¥4atomic_compare_exchange_weakÁ¥consumeÁ
AtomicConsumeÁValÁ load_consumeÁˆ impl_atomicÁ¥­ cache_paddedÁ¢¥¤¥¦¥¦æ ¦©
ª¥ªåª´®¥®±¥±×´¥´÷·¥·×backoffÁ»»»»
SPIN_LIMITÁ» YIELD_LIMITÁ»BackoffÁÁstepÁ»Ãæ ÃresetÁÃspinÁÃsnoozeÁà is_completedÁ»É×»Ë>çÎ once_lockÁÏÏÏÏOnceLockÁÓ¥ÓonceÁÓ»Ï×¥ÏÙ¥ÏÛ¥Ûæ Û get_or_initÁÞÛ
initializeÁàà Û
get_uncheckedÁÏä¥äãÎparkerÁçççççççççç ç
ç çParkerÁôunparkerÁô_markerÁççø>çúæ úparkÁú park_timeoutÁú
park_deadlineÁúÓúinto_rawÁúfrom_rawÁç×çUnparkerÁinnerÁçççˆunparkÁˆÍˆÝçŒ×玃çEMPTYÁçPARKEDÁçNOTIFIEDÁçInnerÁºÒ cvarÁç ¦Î sharded_lockÁšššššššššš š
š š š
ššššššššššššššš
NUM_SHARDSÁšShardÁ¸Ò ¸ write_guardÁš ShardedLockÁ»¥»shardsÁ»»š¿¥šÁ¥šÃ¥šÅ¥šÇ¥Çæ É Ç©
šÌ¥Ì is_poisonedÁÌget_mutÁÌtry_readÁÌreadÁÌ try_writeÁÌ® šÔ¥Ô×ÖLockedPlaceholderÁ×
ÖÙךۥÛ>šÞ¥Þ÷š ᥚ
ã¥ãåã´š ç¥çך ê¥êך
í¥šï¥ïãšò¥òךõ¥õךø¥øåø´šü¥üš
current_indexÁÿ š
ThreadIndicesÁmappingÁ free_listÁ
next_indexÁšthread_indicesÁTHREAD_INDICESÁinitÁš RegistrationÁˆÖˆ thread_idÁšãÎ
wait_groupÁ WaitGroupÁЦü˜>šæ šwaitÁ㟃¡×ÎÎÎÎÎÎÎΊ«««««««««« «
« « « SharedVecÁ¹¥« SharedOptionÁ»¥«scopeÁ½'envÁ½½£½ AbortOnPanicÁÁ
½Ãã½ ½ ½ «ScopeÁÈô%ÈhandlesÁÈš#Èã««Îô%ÎspawnÁÐ'scopeÁÐÐ¥ÎbuilderÁÔ˜'«Ö׫ؘ'Øô%ØÐ Ø
stack_sizeÁØ'ÝÝ¥Ý «á¥«ã¥«ScopedJoinHandleÁå˜'å¥åhandleÁå åŠåã«ì¥ìjoinÁî 슫úñññññö¥ö as_pthread_tÁöinto_pthread_tÁ«ú¥ú×4ý fetch_addÁý fetch_subÁýþýŽýŸý®ý fetch_maxÁý fetch_minÁ4 *±*þŽŸ®â*ó*4 *±*þŽŸ®â*ó*4˜ *˜±*˜þ˜Ž˜Ÿ˜®˜â*˜ó*4¡ *¡±*¡þ¡Ž¡Ÿ¡®¡â*¡ó*4ª *ª±*ªþªŽªŸª®ªâ*ªó*4³ *³±*³þ³Ž³Ÿ³®³â*³ó*4¼ *¼±*¼þ¼Ž¼Ÿ¼®¼â*¼ó*4Å *ű*ÅþÅŽÅŸÅ®Åâ*Åó*4Π*α*ÎþΎΟήÎâ*Îó*4× *×±*×þ׎ן׮×â*×ó*4à *à±*àþàŽàŸà®àâ*àó*é­é¸ëí­í¸ïñ­ñ¸óõ­õ¸÷ù­ù¸ûý­ý¸ÿ­¸ƒ­¸ ­¸
­¸ ­¸¸ CachePaddedÁ¥»š¥šƒ ¥
Ÿ¥Ÿ> ¢¥¢§¤ù ¦¥
¨¥¨«¥«ÖšShardedLockReadGuardÁ®'aÁ®¥®Ò ®_guardÁ®ãšShardedLockWriteGuardÁ´ä4´¥´Ò ´ãš REGISTRATIONÁ¹__rust_std_internal_init_fnÁ¹ » ¼__RUST_STD_INTERNAL_VALÁ» ¾6«ScopedThreadBuilderÁÀ˜'Àô%Àç%À¶'«Å˜'Åô%Å×*
+
3
U
V
W
Z
]
`
a
b
f
j
k
l
m
v
v
v
ƒ




­
°
³
³
³
¹
¹
¹
Å
Æ
Ç
È
Ê
Ê
Ê
Þ
à
ã
æ
ü
ý
þ
ÿ
ƒ
ƒ
ƒ





˜

Î
Ï
Ð
Ñ
Ò
Ó
Ö
Ö
Ö
Ú
Ú
Ú
á
ã
æ
ç
é
é
é
ê
ì
ì
ì
í
ï
ñ
ò
ô
ô
ô
õ
÷
÷
÷
ø
û
ü
þ
Œ
ž
 
¢
¢
¢
½
Ä
Í
Ð
Ö
×
×
×
Ý
á
ã
ì
ð
ö
ø
ú
ü
ü
ü
þ
ÿ



ƒ



ˆ

Š

Œ

Ž









š

œ

ž
Ÿ
 
¢
£
¤
¥
¦
§
¨
©
«
¬
­
®
¯
°
±
²
´
µ

·
¸
¹
º
»
½
¾
¿
À
Á
Â
Ã
Ä
Æ
Ç
È
É
Ê
Ë
Ì
Í
Ï
Ð
Ñ
Ò
Ó
Ô
Õ
Ö
Ø
Ù
Ú
Û
Ü
Ý
Þ
ß
á
â
ã
ä
å
æ
ç
è
ë
ï
ó
÷
û
ÿ
ƒ





œ
¤
¤
ª
ª
­
È
È
È
Œ"--º .Ò /ºæ$4®¢§IÌìEEÌ G»4eÀ\á³
iÿ¥ âA«½âA¬½âAŒ"âA³âAéâAŒB¿câA¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”&¤]¤]V¦]Á‚]üß3ø¤”& ŒBØ›3»(BP:®YöBŒBŠ ùG³ùGšeùGÐìùGµßùGùGùGÌìùG ùGé!ùGö!ùG¿cùGéùGŒBÄcùG¿cÁÁ¤»
N%°H:ü³½I ÓÓ¼ÕÔÏÖ»Ïg#3E`oo”ŒBÌìüIŒ"üIÌìôôÅõÓçöãç!
Ï<+¬|³ÖJ¿cÖJÌìúŠçû›%+R½1 ¬K¿c¬KجKÌì»»¡½¼š¾»š¶&{úe¢ËXŒB €L«½€L¬½€L¿c€L¿c×ר¡ Ü
&Fã¶?]³€Lé€LŒB ®®È4±Ò š²þ4š³ãšÙÆC„8¥é!²M¿c²MÄc²M ´´”5·Ò š¸ãš•oC½¢n²8ýMŒ"¨N¿c¨NÄc¨Né!¨Nö!¨NŒ"ˆˆà"ÖšŠü"šdyþÇÌ©³Å#ŠbOaõ)¬æŒ"äOØäO¿cäOŒ"ÁÁÂ&  Òh¥ ÈÈÅ&ÊÚ&«Ëš#«Ìã«ÚW‹*jÐ8¿cäP¿cÀÀ¾6Ãç%«Ä¶'« éZ®Oyj˜'ô%ÌìååÀ(èè(«é «êŠ«ë㫊ØáV×kÍ&8ýM ŽRŠ*ŽR¿cŽR2-dÓï´ˆÃÁHÙÓ÷ô¿»áåJ×ÓÁ»á®í´ÍÈãåL»N»nËÁøôÛ»˜qÞ»tÉÁôŒÔ»Ù×ç®ò´¡ÖÈÅÀúåé¤]í¤]ñ¤]õ¤]ù¤]ý¤]¤]…¤]‰¤]¤]‘¤]™¤]šŽŸ¢¦¨«ªã®ø´®ü´·ê®õ´öåŒ"Ìì- /«½=¬½ ³ é(¿c
 YØTŠ šeÐìµßé!ö!ÄcŠ*œË
„Ë
ŒÄ ÜÇC>ü±8 & èï)ü…j&&ä
'º5OKŸNð«šC¯Eüž&¬®¿
"„®
ñŒB3D ÂY
`
õ0ÑÛÑÛ MaybeUninitÁÓÛuninitÁÝÔÛ»ÝÍõƒ«%9ŒB¿Ñ ÃüþQ EŒB ÎÕüÊRâAŒBÛî0î0
UnsafeCellÁð0»Ì-·}—KEüC£µZpµZoŒBo¹\ÔŒ#
 Č#
ŒB%¬#TüÞ"N$ý"ü³ú,œ´ú
Œ´ú
À0œËú
ŒËú
À0r Þú üâú.¤ãú
”ãú
Êï]-¤ûú
”ûú
Ê£^-l û ü³ú] "(’ûwüªùè$ÌùcÇCaÇC5êÇCçÇC½DCÇC67Át߇
d߇
)(ü· 
 „·
¨ûXQ- í‡ü®‡A|›3»(BP:®YöBûX¤·‡ûX½\CÇCLENÁCÇCLENÁø–ÔQið–×Q
à–×Q
wŒBÁ U™+Rˆt8TZˆR$ðŽ ¼R
½R 28ø—ÔQið—×Q
à—×Q
wŒBˆD17ˆR ­µ¼R 
ª½R ·d39ø˜ÔQi
ð˜×Q 
à˜×Q
wŒBöD 17  ˜ˆR
Xa˜¼R

 
W˜½R
 ·d4 :
ø™ÔQið™×Q
à™×Q
wŒBäE
17 ˆR¼R
½R ·d4:øšÔQiðš×Q
àš×Q
wŒBÒF
17šˆR´½š¼R
³š½R ·d4:,öŽ ÝXÿŽü¯ŽPø–„R9ø—„R9ø˜„R9ø™„R9øš„R9$ÔŽ·dO·d ø–öQG ©cº·deaø—öQG ˆD2·dßÛø˜öQG öD¬·dVRø™öQG äE#·dÍÉøšöQG ÒFš_aÁ[Àkº Àk
ÀkyÀk×M å2ìË2 ŒB ç2î2¨ü˜2VùGt²2ŒB ©2ŒBg¿4F
F10Á

þ8'üÓ&¬ã
ϋ
òŒB+8
?¯ZIZ øüšj ÓŒB ƒŠÝüîœüI$‹ï8ï8OnceÁð8Šé8ãTPàVça÷[óµZñ]ÇCÇCÇCÇCùè·e
éè·e
¾£OùèÕúe»Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ£O £Oõq²âùçfa¹®®£°Š¨it§ÅLS¶£Oáç¢faZ»õqõqùèðe
éèðe
УO17ù覮e
 ¼ìDúqs·d0õq è¿eùèíÔeùè‚!­e
 ¾ìD„u·d$õq è!eP èÀ$eùèÛôe»õq ¼ìD„u·dì¾ìD„u·d£T»Î«íÀë ›3\‘ºÁÍü¸ü30 Miscellaneous tools for concurrent programming.Á4út8 ## AtomicsÁGúüK<9 * [`AtomicCell`], a thread-safe mutable memory location.ÁüˆYV * [`AtomicConsume`], for reading from primitive atomic types with "consume" ordering.Áâúìæ ## Thread synchronizationÁúüˆ-* * [`Parker`], a thread parking primitive.Áü¶OL * [`ShardedLock`], a sharded reader-writer lock with fast concurrent reads.Áü†PM * [`WaitGroup`], for synchronizing the beginning or end of some computation.Á×ú„Û
## UtilitiesÁìúüð96 * [`Backoff`], for exponential backoff in spin loops.ÁüªVS * [`CachePadded`], for padding and aligning a value to the length of a cache line.ÁüQN * [`scope`], for spawning threads that borrow local variables from the stack.ÁÓúü×&# [`AtomicCell`]: atomic::AtomicCellÁüþ,) [`AtomicConsume`]: atomic::AtomicConsumeÁä« [`Parker`]: sync::ParkerÁüÈ&# [`ShardedLock`]: sync::ShardedLockÁüï" [`WaitGroup`]: sync::WaitGroupÁä’ [`scope`]: thread::scopeÁüï ü™6»Î«íüÀý›3üºûÁÍ=@C„Þ :Ö„§Üžœç spin_loopÁL   ¬”œµK²†JCondvarÁ<·‡>¤µ>¬Ó¦t› ›_
®¼À
AtomicBoolÁT¤¬]
AtomicI16ÁL°£ÁAtomicI8ÁD»ÕÀ AtomicIsizeÁ\ÅÝà AtomicU16ÁLÒÊÁAtomicU8ÁDÝüÀ AtomicUsizeÁ\ç„Ä AtomicI32ÁL´ñÁ AtomicU32ÁL¿˜Â AtomicI64ÁLͿ AtomicU64ÁLØæÂ”†il\_”þHK25ìîÔÖ¹»”Ÿ¤¦”¸vx]_L¦ñôäçŒ Atomic types.Áúü<ÆwüSYŒx4Ì E˜
œóµ Ì´ü®!Ö„ÙÜÐ&-í
ë Õ $(]"؃\.„Ä#®D;¼À$<RÁ%ÍLa”T4FH79tK+Ìw<‰ûX5OKŸNð«'”Û&&šCdòûX)*+,ü…!ûX((aüû5|‰É ÉûXÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÇC( (
*üæ8Ê ÊûXÇC( (
+stampÁ,‰ ü¼
7
 ûX¦A((
,
üÓ#Œå¦Aæ$4®¢§I./3´–$–--”Œ--ÇC´æ¦A1Ì˦A·d00
1ü³¦A3"3”çË Ë¦A·d2 ï2
3óµ ÌÒüÌ!Ö„êÜá\ Ewz€Õ $€46®D†¼À47 ›3\œ48º[T¹î049Ï4:×Þ `4;íë4= ManuallyDropÁdùÃÛ4>ÁY\‡ÑÛ4?
RefUnwindSafeÁl§¬½4A
UnwindSafeÁT¶«½4Bµ Í4Cä
&4Dô_$4w”• ´­ûLÉîLØáLçÔí»½«­\™xzLÇlÄ×_ĸüò*' A thread-safe mutable memory location.Áúü¡]Z This type is equivalent to [`Cell`], except it can also be shared among multiple threads.Áÿúüƒ`] Operations on `AtomicCell`s use atomic instructions whenever possible, and synchronize usingÁüä]Z global locks otherwise. You can call [`AtomicCell::<T>::is_lock_free()`] to check whetherÁüÂ.+ atomic instructions or locks will be used.Áñúüõ]Z Atomic loads use the [`Acquire`] ordering and atomic stores use the [`Release`] ordering.ÁÓúì× [`Cell`]: std::cell::CellÁüõA> [`AtomicCell::<T>::is_lock_free()`]: AtomicCell::is_lock_freeÁü·52 [`Acquire`]: std::sync::atomic::Ordering::AcquireÁüí52 [`Release`]: std::sync::atomic::Ordering::ReleaseÁ¥FFÍìŒB ÎâAeÀ\á³
iÿGf üƒ!4EE÷[ü©+¥IIÔ˜ µÌìŒBâAüØ+¥KKÔ˜ äÈ™âAüˆ$¥MMÔ˜ âA ü°'¥OOÔ˜ µâA ¬Ü¥QQÔ˜ áâARSTUVWüÊ)üø52 Creates a new atomic cell initialized with `val`.Á²ú # ExamplesÁÍú ```Áüá,) use crossbeam_utils::atomic::AtomicCell;Áúüš let a = AtomicCell::new(7);ÁǛ׌BâAPP
RŒB¹!ä„üÛ85 Consumes the atomic and returns the contained value.Á˜úü UR This is safe because passing `self` by value guarantees that no other threads areÁüú+( concurrently accessing the atomic data.Áªú¤›ÅúÇ›üÙ,Ø›Šúü’šœܶ let v = a.into_inner();ÁÖú¬Þ assert_eq!(v, 7);ÁÇ›TâAŒBPP
SŒB$üÞ"#ü£FC Returns `true` if operations on values of this type are lock-free.ÁîúüöVS If the compiler or the platform doesn't support the necessary atomic instructions,ÁüÑ\Y `AtomicCell<T>` will use global locks for every potentially concurrent atomic operation.Á²ú¤›ÍúÇ›üá,Ø›úüšUR // This type is internally represented as `AtomicUsize` so we can just use atomicÁüô! // operations provided by it.Áüš:7 assert_eq!(AtomicCell::<usize>::is_lock_free(), true);ÁÙúüá'$ // A wrapper struct around `isize`.Á
struct Foo {Áœ¢ bar: isize,ÁüÄIF // `AtomicCell<Foo>` will be internally represented as `AtomicIsize`.Áü’85 assert_eq!(AtomicCell::<Foo>::is_lock_free(), true);ÁÏúü×;8 // Operations on zero-sized types are always lock-free.Áü— 74 assert_eq!(AtomicCell::<()>::is_lock_free(), true);ÁÓ úüÛ \Y // Very large types cannot be represented as any of the standard atomic types, so atomicÁü¼!LI // operations on them will have to use global locks for synchronization.Áü"@= assert_eq!(AtomicCell::<[u8; 1000]>::is_lock_free(), false);Á<Ò"Ç›dë"PP
TŒBÜÓ%ü²#&# Stores `val` into the atomic cell.ÁÝ#útå#¤›ø#ú<€$Ç›üŒ$,Ø›½$úüÅ$šœé$úäñ$ assert_eq!(a.load(), 7);Á|% a.store(8);Áä¦% assert_eq!(a.load(), 8);Á<Ç%Ç›,Ú%Ì ÌâAŒB·dP à%P
UŒB$á%¹ç%ü€*ü²'EB Stores `val` into the atomic cell and returns the previous value.Áü'út„(¤›—(ú<Ÿ(Ç›ü«(,Ø›Ü(úüä(šœˆ)úä)¹¬ì±) assert_eq!(a.swap(8), 7);ÁäÓ)ö¬<ô)Ç›$‡*Í Í
8¸8¬ ¼ ¾8" Ç õ É
Ê Ë ó 8 Ð8ß
 × Ø8Ú
Ý88Õ 'ê, ì8Õ % ö8¬ Ž ‘Ž8 *L’Ž ›Ž ±Ž8¹œŽ$ ŸŽ8®D¡Ž'©Ž8F4«Ž$ ÈŽ ÞŽ …‘8øŽ8þ44üŽ ƒ8Ò $…   8 Ž8ß
4  8˜8¬,› ¡8®  § ¨% ©8Ã8» Í8" Ö î Ø8Ù
Ý Þ ì8 ã8ß
 ê ë% ï88Ðä 
8»,”% 
³8» º8» Á8æ Î Ò8¹Ï% Ó8Ðäí<áåü´‘I<úŠ’<Àæüš’&<úÍ’<¤›tÝ’<úø’<Ç›<ˆ“<Ø›üœ“,<úÕ“+ å“ æ“ õ“8Óç“ ë“, í“8€Ý<î“<úƒ”<èü“”"<­èä”<Ç›<ë”+ ÿ” €• ‡•8Ý48••8 ™•8±*Lœ• ¥• ´• ¦•8$§•$ «•8¹­•& °•, ²•8¿ ³•(¶•, ¹•8¿ º• ¼• š8Õ 4Ε Ô• Ö• š, ì•8¿ í•$ î•8Àkð•$ ò• ˆ– ±—
8¢–8¬ ¦– ¨–8"4ª– ±– ß– ³–
´– µ– Ý– 8$¶– º–8ß
4»– Á– –8Ä–
Ç–8,È–8Õ 4Ζ'Ô–, Ö–8Õ 4×–% à–8¬ ú– û–8±*Lü– …— ›—8¹†—$ ‰—8®D‹—'“—8F4•—$ ²— È— ï™8â—8þ44æ— í—8Ò $ï— ó— Š˜8$ô— ø—8ß
4ù— ÿ— €˜8‚˜8¬,…˜ ‹˜8® ,Œ˜ ‘˜ ’˜% “˜8­˜8»,±˜ ·˜8"4¹˜ À˜ ؘ ˜8Ø
ǘ Ș Ö˜8$ɘ ͘8ß
4Θ Ô˜ Õ˜% Ù˜8ó˜8Ðä÷˜ û˜
ý˜8»,þ˜% ƒ™
8»,ž™ ¤™8»,¦™ «™8ëd¬™ ¸™ ¼™8¹¹™% ½™8Ðä×™<ÃíüžšN<úùš<¤›t‰›<ú¤›<Ç›<´›<Ø›üÈ›,<úœ+ ‘œ ’œ ¡œ8Ó“œ —œ, ™œ8€Ý<šœ<ú¯œ<¬ïü¿œ"<Øïäîœ<Ç›<—+ « ¬ ³8Ý8Á8 Å8þ Ñ à Ò8$ ×8¹Ù& Ü, Þ8¿ ß(â, å8¿ æ è ¨¢8Õ  €ž ‚ž š¢, ˜ž8¿ ™ž$ šž8Àkœž$ žž ´ž ÝŸ
8Ξ8¬ Òž Ôž8"4Öž Ýž ‹Ÿ ßž
àž áž ‰Ÿ 8$âž æž8ß
4çž íž îž8ðž
óž8,ôž8Õ 4úž'€Ÿ, ‚Ÿ8Õ 4ƒŸ% ŒŸ8¬ ¦Ÿ §Ÿ8þL¨Ÿ ±Ÿ ÇŸ8¹²Ÿ$ µŸ8®D·Ÿ'¿Ÿ8F4ÁŸ$ ÞŸ ôŸ ˆ¢8Ž 8þ44  ™ 8Ò $›  Ÿ  ¶ 8$   ¤ 8ß
4¥  «  ¬ 8® 8¬,±  · 8® ,¸  ½  ¾ % ¿ 8Ù 8»,Ý  ã 8"4å  ì  „¡ î 8ï 
ó  ô  ‚¡8$õ  ù 8ß
4ú  €¡ ¡% …¡8Ÿ¡8Ð䣡 §¡
©¡8»,ª¡% ¯¡
É¡8»,Ê¡С8¹Ó¡% Ö¡8Ðäð¡<Äôü·¢O<ú“£<¤›t££<ú¾£<Ç›<Σ<Ø›üâ£,<ú›¤+ «¤ ¬¤ »¤8Ó­¤ ±¤, ³¤8€Ý<´¤<úɤ<®öüÙ¤#<Ûöü‰¥#<Ç›<¹¥+ Í¥ Î¥ Õ¥8Ý4Ï¥8ã¥8 ç¥8ŽTê¥ ô¥ ƒ¦ õ¥8$ö¥$ ú¥8¹ü¥& ÿ¥, ¦8¿ ‚¦(…¦, ˆ¦8¿ ‰¦ ‹¦ Ôª8Õ 4¦ £¦ ¥¦ ƪ, »¦8¿ ¼¦$ ½¦8Àk¿¦$ Á¦ צ ¨
8ñ¦8¬ õ¦ ÷¦8"4ù¦ €§ ®§ ‚§
ƒ§ „§ ¬§ 8$…§ ‰§8ß
4Ч § ‘§8“§
–§8,—§8Õ 4§'£§, ¥§8Õ 4¦§% ¯§8¬ ɧ ʧ8ŽT˧ Õ§ ë§8¹Ö§$ Ù§8®DÛ§'ã§8F4å§$ ‚¨ ˜¨ ´ª8²¨8þ44¶¨ ½¨8Ò $¿¨ è Ú¨8$Ĩ Ȩ8ß
4ɨ Ϩ Ш8Ò¨8¬,Õ¨ Û¨8® ,ܨ ᨠâ¨% ã¨8ý¨8»,© ‡©8"4‰© © ¨© ’©8“©
—© ˜© ¦©8$™© ©8ß
4ž© ¤© ¥©% ©©8é8ÐäÇ© Ë©
Í©8»,Ω% Ó©
í©8»,î© ô© ö© ÷© ª8Ðäø© ü©8¹þ©% ‚ª8Ð䜪<öûüãªM<ú½«<¤›tÍ«<úè«<Ç›<ø«<Ø›üŒ¬,<úŬ+ Õ¬ Ö¬ å¬8Ó׬ Û¬, ݬ8€Ý<Þ¬<úó¬<Þýüƒ­"<Šþì²­<Ç›<Ü­+ ð­ ñ­ ø­8Ý4ò­8†®8 Š®8ŸD® •® ¤® –®8$—®$ ›®8¹®&  ®, ¢®8¿ £®(¦®, ©®8¿ ª® ¬® ë²8Õ 4¾® Ä® Æ® ݲ, Ü®8¿ Ý®$ Þ®8Àkà®$ â® ø®  °
8’¯8¬ –¯ ˜¯8"4𝠡¯ ϯ £¯
¤¯ ¥¯ ͯ 8$¦¯ ª¯8ß
4«¯ ±¯ ²¯8´¯
·¯8,¸¯8Õ 4¾¯'į, Ư8Õ 4ǯ% Я8¬ ê¯ ë¯8ŸDì¯ ô¯ а8¹õ¯$ ø¯8®Dú¯'‚°8F4„°$ ¡° ·° ˲8Ѱ8þ44Õ° ܰ8Ò $Þ° â° ù°8$ã° ç°8ß
4è° î° ï°8ñ°8¬,ô° ú°8® ,û° €± ±% ‚±8œ±8», ± ¦±8"4¨± ¯± DZ ±±8²±
¶± ·± ű8$¸± ¼±8ß
4½± ñ ı% ȱ8â±8Ðäæ± ê±
ì±8»,í±% ò±
Œ²8»,²“²8¹–²% ™²8Ðä³²<÷‚üú²N<úÕ³<¤›tå³<ú€´<Ç›<´<Ø›ü¤´,<úÝ´+ í´ î´ ý´8Óï´ ó´, õ´8€Ý<ö´<ú‹µ<à„ü›µ"<Œ…äʵ<Ç›<óµ+ ‡¶ ˆ¶ 8Ý4‰¶88 ¡¶8®L¤¶ ­¶ ¼¶ ®¶8$¯¶$ ³¶8¹µ¶& ¸¶, º¶8¿ »¶(¾¶, Á¶8¿ ¶ Ķ „»8Õ 4Ö¶ ܶ Þ¶ öº, ô¶8¿ õ¶$ ö¶8Àkø¶$ ú¶ · ¹¸
8ª·8¬ ®· °·8"4²· ¹· ç· »·
¼· ½· å· 8$¾· ·8ß
4÷ ɷ ʷ8̷
Ï·8,з8Õ 4Ö·'Ü·, Þ·8Õ 4ß·% è·8¬ ‚¸ ƒ¸8®L„¸ ¸ £¸8¹ޏ$ ‘¸8®D“¸'›¸8F4¸$ º¸ и äº8ê¸8þ44î¸ õ¸8Ò $÷¸ û¸ ’¹8$ü¸ €¹8ß
4¹ ‡¹ ˆ¹8й8¬,¹ “¹8® ,”¹ ™¹ š¹% ›¹8µ¹8»,¹¹ ¿¹8"4Á¹ ȹ ๠ʹ8˹
Ϲ й Þ¹8$ѹ Õ¹8ß
4Ö¹ ܹ ݹ% á¹8û¹8Ðäÿ¹ ƒº
…º8»,†º% ‹º
¥º8»,¦º¬º8¹¯º% ²º8Ðä̺<ø‰ü“»A<Êüá»#<ú‘¼<¤›t¡¼<ú¼¼<Ç›<̼<Ø›üà¼,<ú™½+ ©½ ª½ ¹½8Ó«½ ¯½, ±½8€Ý<²½<úǽ< assert_eq!(a.fetch_max(9), 7);Áü×½"<æË䆾<Ç›<¯¾+ þ ľ ˾8Ý4ž8Ù¾8 ݾ8â*Là¾ é¾ ø¾ ê¾8$ë¾$ ï¾8¹ñ¾& ô¾, ö¾8¿ ÷¾(ú¾, ý¾8¿ þ¾ €¿ ÎÃ8Õ 4’¿ ˜¿ š¿ ÀÃ, °¿8¿ ±¿$ ²¿8Àk´¿$ ¶¿ Ì¿ õÀ
8æ¿8¬ ê¿ ì¿8"4î¿ õ¿ £À ÷¿
ø¿ ù¿ ¡À 8$ú¿ þ¿8ß
4ÿ¿ …À †À8ˆÀ
‹À8,ŒÀ8Õ 4’À'˜À, šÀ8Õ 4›À% ¤À8¬ ¾À ¿À8â*LÀÀ ÉÀ ßÀ8¹ÊÀ$ ÍÀ8®DÏÀ'×À8F4ÙÀ$ öÀ ŒÁ ®Ã8¦Á8þ44ªÁ ±Á8Ò $³Á ·Á ÎÁ8$¸Á ¼Á8ß
4½Á ÃÁ ÄÁ8ÆÁ8¬,ÉÁ ÏÁ8® ,ÐÁ ÕÁ ÖÁ% ×Á8ñÁ8»,õÁ ûÁ8"4ýÁ „ œÂ †Â8‡Â
‹Â ŒÂ šÂ8$ ‘Â8ß
4’ ˜Â ™Â% Â8·Â8Ðä»Â ¿Â
ÁÂ8»,ÂÂ% ÇÂ
áÂ8»,â èÂ8êÂ'íÂ8¤‘ï ò ûÂ8ÐäóÂ$ öÂ8¹øÂ% üÂ8Ðä–Ã<ú‘üÝÃA<Êü«Ä#<úÛÄ<¤›tëÄ<ú†Å<Ç›<–Å<Ø›üªÅ,<úãÅ+ óÅ ôÅ ƒÆ8ÓõÅ ùÅ, ûÅ8€Ý<üÅ<ú‘Æ<ô“ü¡Æ"<˾äÐÆ<Ç›<ùÆ+ Ç ŽÇ •Ç8Ý4Ç8£Ç8 §Ç8ó*LªÇ ³Ç ÂÇ ´Ç8$µÇ$ ¹Ç8¹»Ç& ¾Ç, ÀÇ8¿ ÁÇ(ÄÇ, ÇÇ8¿ ÈÇ ÊÇ ˜Ì8Õ 4ÜÇ âÇ äÇ ŠÌ, úÇ8¿ ûÇ$ üÇ8ÀkþÇ$ €È –È ¿É
8°È8¬ ´È ¶È8"4¸È ¿È íÈ ÁÈ
ÂÈ ÃÈ ëÈ 8$ÄÈ ÈÈ8ß
4ÉÈ ÏÈ ÐÈ8ÒÈ
ÕÈ8,ÖÈ8Õ 4ÜÈ'âÈ, äÈ8Õ 4åÈ% îÈ8¬ ˆÉ ‰É8ó*LŠÉ “É ©É8¹”É$ —É8®D™É'¡É8F4£É$ ÀÉ ÖÉ øË8ðÉ8þ44ôÉ ûÉ8Ò $ýÉ Ê ˜Ê8$‚Ê †Ê8ß
4‡Ê Ê ŽÊ8Ê8¬,“Ê ™Ê8® ,šÊ ŸÊ  Ê% ¡Ê8»Ê8»,¿Ê ÅÊ8"4ÇÊ ÎÊ æÊ ÐÊ8ÑÊ
ÕÊ ÖÊ äÊ8$×Ê ÛÊ8ß
4ÜÊ âÊ ãÊ% çÊ8Ë8Ðä…Ë ‰Ë
‹Ë8»,ŒË% ‘Ë
«Ë8»,¬Ë ²Ë8´Ë'·Ë8¬™¹Ë ¼Ë ÅË8Ðä½Ë$ ÀË8¹ÂË% ÆË8ÐäàË% ©Ì¬³ÖEEÌ G»4eÀ\á³
iÿjklmüÿÙ*üÏÖNK Applies logical "and" to the current value and returns the previous value.Á¢×útª×¤›½×ú<Å×Ç›üÑ×,Ø›‚ØúüŠØ" let a = AtomicCell::new(true);Á±Øúü¹Ø(% assert_eq!(a.fetch_and(true), true);ÁüæØ assert_eq!(a.load(), true);ÁŠÙúü’Ù)& assert_eq!(a.fetch_and(false), true);ÁüÀÙ  assert_eq!(a.load(), false);Á<åÙÇ›L†ÚÕ ÕÏði Úi
j$‘Ú¹—Úüâ+üþÝOL Applies logical "nand" to the current value and returns the previous value.ÁÒÞútÚÞ¤›íÞú<õÞÇ›üß,Ø›²ßúüºß"Àñáßúüéß*' assert_eq!(a.fetch_nand(false), true);Áü˜à­ò¼àúüÄà)& assert_eq!(a.fetch_nand(true), true);Áüòà ˜ó—áúüŸá+( assert_eq!(a.fetch_nand(false), false);ÁüÏá­ò<óáÇ›T”âÖ ÖÏði Ÿâi
k$ â¹¦âüÆé)ü–æMJ Applies logical "or" to the current value and returns the previous value.Áèæútðæ¤›ƒçú<‹çÇ›ü—ç,Ø›ÈçúüÐç# let a = AtomicCell::new(false);Áøçúü€è)& assert_eq!(a.fetch_or(false), false);Áü®è ˜óÓèúüÛè(% assert_eq!(a.fetch_or(true), false);Áüˆé­ò<¬éÇ›DÍé× ×Ïði Öéi
l$×é¹Ýéüóð*üÃíNK Applies logical "xor" to the current value and returns the previous value.Á–îútžî¤›±îú<¹îÇ›üÅî,Ø›öîúüþî"Àñ¥ïúü­ï)& assert_eq!(a.fetch_xor(false), true);ÁüÛï­òÿïúü‡ð(% assert_eq!(a.fetch_xor(true), true);Áü´ð ˜ó<ÙðÇ›LúðØ ØÏði „ñi
m$…ñ¹‹ñüðô*¥ooÔ˜ õôÍ´<øôâAp´pì¡õ<¤õâAnn
pŒBüðõ!¥rrÔ˜ õõâAsësü¦ö $©öŒBâAqq
sŒB¹®öüïö7¥uuÔ˜ ôö¡¸$÷ö¿cŒBTþöâAvÀcv*,ü­÷8°÷ÙÚÛ ÙâA Ú c cˆ¢cµ
 `£cbufÁ `àB¤GS
ÛÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
·dŸÈŸÈ ÈErrorÁ O˜éBLt ´÷t
vŒB$µ÷± »÷üªù&l³ù4xyyxÍìï] ÁùÍì£^ Äù
wï]£^"$ üœÿ(.\ÿ$Ÿÿ4ÇC”Œ
zaddrÁ$¤ÿ„“‡™‡4ÇC쮇 ´‡4óaüô‡),û‡4óa~Ç€Cÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€C™ˆÇC¤ˆ}}ÇCŒ¿ŠTÆŠ4©cU™+Rˆt8/*4©c|ÓŠ©cƒü÷Š $úŠ4Ü Ü©c¼À½À¾ÀË¿ÀÀÀÌÁÀÂÀGÃÀÄÀFÅÀÆÀ×`šÁ¬S øB·d ÿŠ
ƒ$€‹_orderÁ4†‹ü®‹+,±‹4Ý Ý©c·d¸’·d ·‹
$¸‹_valÁ$¾‹Í’4È‹üð‹*$ó‹4Þ Þ©c·d¸’·d ø‹
$ù‹¹“$ÿ‹Í’4‰Œü±Œ ¬´Œ4ß ß©c·d·d¸’¸’Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
·d·d ÓŒ
$ÔŒ_currentÁDâŒ_newÁ$øŒ_successÁDŠ_failureÁD¦ü¯Ž)œ¸Ž4¥ˆˆÔ˜ ÌŽú\  ü©=4íGŒB¥ŠŠÔ˜ ¿¡¸
ŒBsrcÁÂ"$ü•.4íGŒB·d¥ŒŒÔ˜ ¬
ŒBdstÁ¯¹¼"$ü­¡2\·¡4íGŒBŒB¥ŽŽÔ˜ á
ŒB՘ơ¹Ó¡ "ü¶§väÀ§4íGŒBŒB¸Å¥Ô˜ ݧ¡¸$¢¨òº©¨
ŒBÕ˜à§À<ñ§æ ý§<>¼Ô C\î ®D9¼Àä%¼˜üDSP Trait which allows reading from primitive atomic types with "consume" ordering.ÁÎìü˜¸©©Íì±âü¶$! Type returned by `load_consume`.Áäüª$üîDA Loads a value from the atomic using a "consume" memory ordering.Á·úü¿IF This is similar to the "acquire" ordering, except that an ordering isÁüLI only guaranteed with operations that "depend on" the result of the load.ÁüÞGD However consume loads are usually much faster than acquire loads onÁüªJG architectures with a weak memory model since they don't require memoryÁ¼ù fence instructions.ÁúüKH The exact definition of "depend on" is a bit vague, but it works as youÁüíJG would expect in practice since a lot of software, especially the LinuxÁü¼" kernel, rely on this behavior.ÁãúüëHE This
+ Ø
 Ù
 à
8Ý
8 ê
8¸
 ù
 ÿ
 ú
8
(8$„'ˆ8­Š Ž Ñ8#œ8, '¥8Å'°8ç'8Õ 4¸'¾8¦% Î8Ü8  ç8 í8¬ ò 8®'û8Ë% 8¦t“ ¡ ³8®'ª8G% ´8 % ØÄ­ Æ » Ì ã , Í8Õ & Ô8¼$ Ú, Ü8¹Ý& à8´á*å è ¸+ ò ó 8âô ÷ 8
ø û 8°¥œü8$8˜l 8
®8í'8ç$¸'¼8Õ 'Ä, Æ8Õ  Î 
8!8­á å, ç8¹è% ë8ˆ   % ˆ+ œ  ±8âž ¡ °8Ö88˜8
Î8loomÁ'Ö8ç'Ü8Õ 'ä, æ8Õ  î ²
8!8­ , 8¹ˆ% 8ˆd™ ¥ ¦ §% ¨% ¹üª:°¥œ“¬’ü‰ ¥ššÔ˜ ¯ÀG›ðíG´ƒ
/C„â×
 `žr,é! DerefMutÁD&ö!¡LCL57ü¾/,¥££Ô˜ Ê/È™$Í/ùGüî/,¥¥¥Ô˜ ú/ ŒB$ý/ùG´Ÿ0¥§§Ô˜ ¤0ùG¨©
ü˜2(ü¼0:7 Pads and aligns a value to the length of a cache line.Áû0útƒ1¤›1ú<ž1Ç›üª1%" use crossbeam_utils::CachePadded;ÁÔ1úüÜ1+( let padded_value = CachePadded::new(1);Á<Œ2Ç›¥2ŒBùG¦¦
¨ŒB¿i6äÿ4äô2 Returns the inner value.Á•3út3¤›°3ú<¸3Ç›üÄ3%˳î3úüö3+( let padded_value = CachePadded::new(7);Áü¦4*' let value = padded_value.into_inner();ÁÌÕ4 assert_eq!(value, 7);Á<ó4Ç›T†5ùGŒB¦¦
©ŒB$‘5üº5 ¥««Ô˜ ¿5ùG¬­ê!ë!­\á54æ5ªªŒB¬÷5,ú5á áùG áŒBª €6ª
­ŒB$6ü¬6#¥¯¯Ô˜ ±6ùG°÷!°üÖ6!LÙ6â âùG âŒB® ã6®
°ŒB$è6ü›71¥²²Ô˜  7”ƒT£7ùG³Àc³üÓ78Ö7ãäå ãùG ä c cˆ¢cµ
 `£c¡ƒ `àB¤GS
åÈ„± Ú7±
³ŒB$Û7± á7üü8"¥µµÔ˜ 9ùG¶ë¬¥9$¨9ŒBùG´´
ŒB¿ ­9üâ95¥¸¸Ô˜ ç9ÄcŒBdê9ùG¹Åc¹!#üž:8¡:æçè æùG ç c cˆ¢cµ
 `£c¡ƒ `àB¤GS
èÈ„· ¥:·
¹ŒB$¦:± ¬:üü .;\Ÿ¿ÀÁ¿ $»¼a$,á.»½×< `»¾´:„ -L6¬BTH»F´]\c»F”ü{/, Performs exponential backoff in spin loops.Á«úü¯RO Backing off in spin loops reduces contention and improves overall performance.Áúü†c` This primitive can execute *YIELD* and *PAUSE* instructions, yield the current thread to the OSÁüêa^ scheduler, and tell when is a good time to block the thread using a different synchronizationÁüÌ^[ mechanism. Each step of the back off procedure takes roughly twice as long as the previousÁ step.Áµú¤›ÈúüÌ$! Backing off in a lock-free loop:ÁñúÇ›üý! use crossbeam_utils::Backoff;ÁüŸ'$ use std::sync::atomic::AtomicUsize;ÁüÇ,) use std::sync::atomic::Ordering::SeqCst;Áôúüø63 fn fetch_mul(a: &AtomicUsize, b: usize) -> usize {Áü¯%" let backoff = Backoff::new();Á loop {Áüä%" let val = a.load(SeqCst);ÁüŠUR if a.compare_exchange(val, val.wrapping_mul(b), SeqCst, SeqCst).is_ok() {ÁÜà return val;Á
ÜŠ backoff.spin();Á—¦Ç›¾úüÂ30 Waiting for an [`AtomicBool`] to become `true`:ÁöúÇ›ü‚ !»Åü¤ &# use std::sync::atomic::AtomicBool;ÁüË ,—Æø úüü &# fn spin_wait(ready: &AtomicBool) {Áü£
%™ÇüÉ
# while !ready.load(SeqCst) {Áìí
 backoff.snooze();ÁL ÊÉ,• —¦<› Ç›£ úü§ \Y Waiting for an [`AtomicBool`] to become `true` and parking the thread after a long wait.Áü„ a^ Note that whoever sets the atomic variable to `true` must notify the parked thread by callingÁŒæ  [`unpark()`]:Áø ú Ç›ü„
!»Åü¦
&çÊüÍ
,—Ƥú
 use std::thread;Áúü“*' fn blocking_wait(ready: &AtomicBool) {Áü¾%™Çüä#ïËüˆ'$ if backoff.is_completed() {Áü° thread::park();Á¤Ð } else {Áüå! backoff.snooze();Ál‡ÉL•ÊÉ—¦Ç›­úü±+( [`is_completed`]: Backoff::is_completedÁüÝ.+ [`std::thread::park()`]: std::thread::parkÁüŒ# [`Condvar`]: std::sync::CondvarÁü°1. [`AtomicBool`]: std::sync::atomic::AtomicBoolÁüâ-* [`unpark()`]: std::thread::Thread::unparkÁ<½I
N%°H:ü»ÁÁá.á.aã.»Ì-IÜžB2®‘Fd½½IÄÅÆÇȤŽäÐ Creates a new `Backoff`.Áñú¤›Œú<”Ç›ü !»ÅÆúüÎ! let backoff = Backoff::new();ÁÇ›½IÃÃ
Äœ«Ì× Resets the `Backoff`.Áõú¤›úÇ›ü¤!»ÅÊúüÒ!ŽÖ¤ø backoff.reset();Á<Ç›é é½I·dà ¸Ã
Å”Äüæ" Backs off in a lock-free loop.Áúü•]Z This method should be used when we need to retry an operation because another thread madeÁ
progress.Áúü‘EB The processor may yield using the *YIELD* or *PAUSE* instruction.ÁÛú¤›öúüþ$ôħúÇ›ü»!»Åüá'æÅü,—ƾúüÆ6ÙÆü%™ÇÇÇü¾%ßÇüèUŽÈÜÂìÈÉÜô¦ÉL”ÊÉ—¦¬úü´  let a = AtomicUsize::new(7);ÁüÙ$! assert_eq!(fetch_mul(&a, 8), 7);Áü‚# assert_eq!(a.load(SeqCst), 56);ÁÇ›ê ê½I·dà ÐÃ
Ƥ¸.ü® ! Backs off in a blocking loop.ÁÔ úüÜ XU This method should be used when we need to wait for another thread to make progress.Á¹!úüÁ![X The processor may yield using the *YIELD* or *PAUSE* instruction and the current threadÁü¡";8 may yield by giving up a timeslice to the OS scheduler.Áá"úüé"GD In `#[no_std]` environments, this method is equivalent to [`spin`].Áµ#úü½#[X If possible, use [`is_completed`] to check when it is advised to stop using backoff andÁü$QN block the current thread using a different synchronization mechanism instead.Áó$úÜû$ [`spin`]: Backoff::spinÁü›%+þÑË%útÓ%¤›æ%úüî%3ƒÊ¦&ú<®&Ç›üº&!»Å¼à& use std::sync::Arc;Áüü&&çÊü§',—ƤØ'¢Ïäñ' use std::time::Duration;Á(úüš(&±ËüÅ(%™Çüï(#ïËì—)›ÌL¹)ÊÉ,Ç)—¦Ñ)úüÙ)1. let ready = Arc::new(AtomicBool::new(false));Áü* let ready2 = ready.clone();Á³*úÜ»* thread::spawn(move || {ÁüÛ*2/ thread::sleep(Duration::from_millis(100));Áü’+# ready2.store(true, SeqCst);Á<º+ });ÁÆ+úüÎ+*' assert_eq!(ready.load(SeqCst), false);Á´ý+ spin_wait(&ready);Áü˜,)& assert_eq!(ready.load(SeqCst), true);ÁüÆ,• # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371Á<à-Ç›ì-úüô-1˜Ó4¿.ë ë½I·dà Æ.Ã
Ç$Ç.üÿ="ü½2[X Returns `true` if exponential backoff has completed and blocking the thread is advised.Á3út¥3¤›¸3úüÀ3\Y Waiting for an [`AtomicBool`] to become `true` and parking the thread after a long wait:Á¡4ú<©4Ç›üµ4!»Å¼Û4‹åü÷4&çÊü¢5,—ƤÓ5¢Ïäì5Ôå6úü•6*ÌÏüÄ6%™Çüî6#ïËü–7'œÐüÂ7ÍФæ7õÐüÿ7!“Ñl¥8ÉL·8ÊÉ,Å8—¦Ï8úü×81ãæü9žçü±9# let waiter = thread::current();ÁÙ9úÜá9Òçü:2÷çü¸:#³èÄà: waiter.unpark();Á<ý:ßè‰;úü‘;*üèÔÀ; blocking_wait(&ready);Áüß;)Ïéü<•ƒê<§=Ç›³=úü»=1˜Ód†>ì ì½Ià “>Ã
È$”>ÜÓ>½IÊÀcÊüõ>8ø>íîï í½I î c cˆ¢cµ
 `£c¡ƒ `àB¤GS
ïÈ„É ü>É
Ê$ý>± ƒ?ÄÑ@½I̴̼ð@<ó@½IËË
̼´@;dæü& # Thread synchronization primitives.Á' úü+- ­yüYO äyü©P ½z»À¼ÎÏçšÅ ô¤úD ¥¡ »§È4¤á ®¨”5¬÷ ´©Å#L© ªl— Öt… „„ Üû L› ÎÓ[T»î0ÏÐÁY\ÖÑÛÏÑ¢o$òï8ÏÒ´¯A´Ë2|ç"ìùD¥ÔÔÔ˜ üIg#3E`oo”ÕÖæ"$T$ÏÓÓ˜pü­!ÏÓÓ÷[üÀ0¥ØØÔ˜ Ìì²È™üIüô)¥ÚÚÔ˜ È™üIœ¢¥ÜÜÔ˜ §üIÝÞàãüî!.\ÞüIÛÛ
ÝŒBü‚ S\ ð ðüI»Í ðŒBÛßß Ÿ ÛäÍ œ –"»Í·d »Í·d˜"ŒB Ó 
ÞŒB»Í ± ¦ GIü«AÏñ ñüI»Í·dÛáá ¼ÛäÍ ¹œý¯ý ê
àŒB»Í± Ã/1µà<closure_kind>Áâ<closure_signature>Áâ<upvars>ÁââàâŒB»ÍÈF·d·d»Í  µZüè$Ïò òüI òŒBÛ Û
ãŒB$äð¥ååÔ˜ õüIæ"攓$–ó óüI·dä ä
æŒB  Îô؃\%
„Äçé×4<
ÅÀçêׯÀçêKb
†JçìÊ<g
‡>çí¤,p
µ>çî×
¤,çï PhantomDataÁ\—
çðÓ‚çðDurationÁD´
­ÖçòInstantÁ<¾
óTçóô

„2
þ´I
ÙÛÅDz´D|
¢ÄŠ
ˆ
[]BDΐ
üÉ
 A thread parking primitive.Áé
úüíW
T Conceptually, each `Parker` has an associated token which is initially not present:ÁÅ
úüÉ^
[ * The [`park`] method blocks the current thread unless or until the token is available, at矬6
3 which point it automatically consumes the token.Áß
úüãa
^ * The [`park_timeout`] and [`park_deadline`] methods work the same as [`park`], but block for矁
 a specified maximum time.Áå
úüéb
_ * The [`unpark`] method atomically makes the token available if it wasn't already. Because theÁüÌ_
\ token is initially absent, [`unpark`] followed by [`park`] will result in the second callÁä¬
 returning immediately.ÁÉ
úüÍb
_ In other words, each `Parker` acts a bit like a spinlock that can be locked and unlocked usingÁä°
 [`park`] and [`unpark`].ÁÍ
ú
¤›à
ú
Ç›¤ì
¢Ïä
Ôåüž&
# use crossbeam_utils::sync::Parker;ÁÅ
úÔÉ
 let p = Parker::new();Áüä!
 let u = p.unparker().clone();Á
úüŠ
 // Make the token available.Á
u.unpark();Áü» 3
0 // Wakes up immediately and consumes the token.Á
p.park();Áý
úÜ
Òçü
2
/ thread::sleep(Duration::from_millis(500));ÁœÐ
 u.unpark();Á
ßèì
úüð
5
2 // Wakes up when `u.unpark()` provides the token.Á
òü´ 
Đ
Ç›Ò
úÔÖ
 [`park`]: Parker::parkÁüñ *
' [`park_timeout`]: Parker::park_timeoutÁüœ
,
) [`park_deadline`]: Parker::park_deadline矃
 [`unpark`]: Unparker::unparkÁ
ÖJ!
Ï<+¬|õö”‚
D
çôô¬Küš

çôôÓ‚Fu\»Ÿ ·dܾ
ÖJ¼Þ
ÖJù´ù¤ü
<ÿ
ÖJøø
ù
ÖJûüýþÿ´’
ÜÝ
 Creates a new `Parker`.Áý
út…
¤›˜
ú< 
Ç›ü¬&
Þ‹×
úÔß
™Œ
Ç›Š
ú
ÖJúú
û”Ù
üÎ@
= Blocks the current thread until the token is made available.Á
út
¤›®
ú
Ç›üÂ&
Þ‹í
úÔõ
™Œü”!
½Œº
úüÂ
ôŒ
û
úüƒ3

ò
Ç›
ô ôÖJ·dú å
ú
ü
üÇ-
ü¡]
Z Blocks the current thread until the token is made available, but only for a limited time.Áƒ
út
¤›ž
ú
Ç›ä²
ÔåüÓ&
Þ‹þ
úÔ†
™Œ¥
úü­U
R // Waits for the token to become available, but will not wait longer than 500 ms.Áü‡/
, p.park_timeout(Duration::from_millis(500));Á
Ç›
õ õÖJ­Ö­Ö‰ƒ®ÖsecsÁâ}¯ÖnanosÁâ}Zµ–²ª·dú Û
ú
ý
timeoutÁ<â
ü .
ü]
Z Blocks the current thread until the token is made available, or until a certain deadline.Áÿ
út‡
¤›š
ú
Ç›ü®'
$ use std::time::{Duration, Instant};ÁüÚ&
Þ‹
úÔ
™Œü¬?
< let deadline = Instant::now() + Duration::from_millis(500);Áð
úüøU
Ø™ôÒ
 p.park_deadline(deadline);Á
Ç›lˆ
ö öÖJóTóTôT§ƒõTˆA t( ¼Í¥Š·dú
ú
þ$—
deadlineÁD
ü¥%#
üî 6
3 Returns a reference to an associated [`Unparker`].Á©!
úü±![
X The returned [`Unparker`] doesn't have to be used by reference - it can also be cloned.Á"
út™"
¤›¬"
ú<´"
Ç›üÀ"&
Þ‹ë"
úÔó"
™Œü’#!
½Œ¸#
úüÀ#
ôŒ|å#
üù#3
l±$
ò<Ã$
Ç›Ï$
úÔ×$
üö$*
ªD¬%
÷ ÷ÖJ ÷¬Kú µ%
ú
ÿ$¶%
ü…(*
üí%+
( Converts a `Parker` into a raw pointer.Á&
út¥&
¤›¸&
ú<À&
Ç›üÌ&&
Þ‹÷&
úÔÿ&
™Œüž'"
 let raw = Parker::into_raw(p);矁'/
, # let _ = unsafe { Parker::from_raw(raw) };Á<ù'
Ç›DŒ(
ÖJ¸“úú
thisÁ$•(
üö+0
üç(+
( Converts a raw pointer into a `Parker`.Á—)
údŸ)
# SafetyÁ°)
úü¸)S
P This method is safe to use only with pointers returned by [`Parker::into_raw`].Á*
út˜*
¤›«*
ú<³*
Ç›ü¿*&
Þ‹ê*
úÔò*
™Œü‘+"
¼¥ü¸+-
* let p = unsafe { Parker::from_raw(raw) };Á<ê+
Ç›D„,
¸“ÖJúú
µ ,
Ôž-
ÖJƒÀcƒü¿-8
Â-
øùú øÖJ ù c cˆ¢cµ
 `£c¡ƒ `àB¤GS
úÈ„ Æ-

ƒ$Ç-
± Í-
φ.
ü¢.9