Files
boc/rust-service/target/debug/deps/libcrossbeam_deque-917cd5333946832c.rmeta
T

170 lines
66 KiB
Plaintext
Raw Normal View History

rust
#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Ácrossbeam_epochÁíR²àaO<: Þ7±*õì-6e29ae3b3cd894c0Ácrossbeam_utilsÁ z“ÚLå<ýÓ;ã¡ÒFÕ-66e145216f0a822fÁíÀdequeÁ 
  
MIN_CAPÁ MAX_BATCHÁFLUSH_THRESHOLD_BYTESÁBufferÁ%¥%µ %capÁ)¥+¥+¤- +˜+atÁ+writeÁ+readÁ3¥3ƒ6¥InnerÁ8¥8frontÁ8backÁ8bufferÁ=¥=ãWorkerÁ@¥@innerÁ@º @flavorÁ@_markerÁF¥H¥Hnew_fifoÁHnew_lifoÁHstealerÁHresizeÁM HreserveÁHis_emptyÁHHpushÁHpopÁS U¥U×StealerÁX¥Xí X \¥ ^¥
`¥`ü ``stealÁ` steal_batchÁ`steal_batch_with_limitÁ`steal_batch_and_popÁ`steal_batch_with_limit_and_popÁ i¥iƒ l¥l×WRITEÁREADÁDESTROYÁLAPÁ BLOCK_CAPÁSHIFTÁHAS_NEXTÁSlotÁv¥vtaskÁvº
z¥z
wait_writeÁBlockÁ}¥}ó }slotsÁ ¥LAYOUTÁæ  wait_nextÁdestroyÁPositionÁˆ¥ˆÖˆ¸InjectorÁŒ¥ŒheadÁŒtailÁŒ ¥¥¥>˜¥˜æ ˜
˜˜˜­˜Ê˜ä˜ü ˜£¥£ã¦¥¦×©¥©ü ©
is_successÁ©is_retryÁ©successÁ©or_elseÁ¯±¥±×´¥´ùšFlavorÁ½FifoÁ¾
½LifoÁÀ
ÃÆ×ÈÖËStealÁÍ¥ÍEmptyÁÏ
ÍSuccessÁÑ
шÍRetryÁÔ
Ö¥ Ø¥Ø!Û¥ÛÖ"Þ¥#à¥àƒ0
1
2
5
?
L
M
O
P
Q
R
S
W
W
W
b
c
d
e
e
f
f
g
g
h
h
k
n
n
n
|


œ


ž
ž
Ÿ
Ÿ
 
 
¡
¢
¥
¨
¨
¨
«
¬
­
³
³
³
Ä
Ç
Ç
Ç
É
Ì
Ì
Ú
Ú
Ý
â
Ìì%%
'µ (¡
µ€AM¼~Zǥ؊ Œ"88 :£ ;¯ <º îcÇî¸õ§ÈÛ½¾¿çÀÁø&Wyq$L6Ø±Š ±¿c±±Ð챵߱±Ìì@@Ù Bí Cº D E 7‘9àŒ×12È¿c°ÌìXX½
Zí [ °N°’"YÈ Ø¿cÌ쌌ێóÿ ÌùfŸÈ ê³êŒ"ê¿cêÐìÍÏÐÙÑÒëÓˆÔÕnÚP.ß~VȵßàààŠ àØà¿càÃLàà)%F@\XŒ3½iÍ6½ÞÍ=ŒÂ½Æ½U@lŒ±ÍȽÛÍʽÖÍ˽ØÍ^X“ŒŒ´ÍÌì·ØŠ Œ"Û ¿cÐìµß ³ ÃL@64Á ù!32Á<
)@´"9  ù!M
²"i.ù!y
²"üÜ-$ù!´"¸¾1ù!ù!ù!@ù!64Á<‡»‡»rù! »ù!1 3rù!0ù!_ù!üîº!sù!,ÿºù!0˜rù!¢rù!ù!ù!L§Á sù!&ù!18<sù! BLOCK_CAPÁ4òÁ¬ûÁ

œûÁ
Ë‚}}Çó á»"Çk,âŠÖÈ]ø#šÂ”¯Âl¯Â4¯Â 
%$¶Â
È‚34¶Â »Â] ÀÂù!%#™Ã #˜Ã
4£Ã ®ÃüÍÁãsù%@#ù&ž"# 
ùYž"#
¶cüÏÂ@> BQ
Xá%#
ÜWdvüîÁÁ èØèØ éØ²‚êØŸ²‚ªë¥CHÈ4ÛÁþ*6¬)ÔÐù!Ï þ*Ñù%Üì#äÈäÈ ArgumentsÁæÈtemplateÁ `çÈÀ `üöMõô]Td_layoutÁÒ<Ó¤ ÍÈÒ)à4È;BíÀÛŒ¹Äͺ½
X»Ù @¼üûü$! Concurrent work-stealing deques.Á%úü)_\ These data structures are most commonly used in work-stealing schedulers. The typical setupÁü‰b_ involves a number of threads, each having its own FIFO or LIFO queue (*worker*). There is alsoÁüìc` one global FIFO queue (*injector*) and a list of references to *worker* queues that are able toÁìÐ steal tasks (*stealers*).Áîúüò_\ We spawn a new task onto the scheduler by pushing it into the *injector* queue. Each workerÁüÒc` thread waits in a loop until it finds the next task to run and then runs it. To find a task, itÁü¶[X first looks into its local *worker* queue, and then into the *injector* and *stealers*.Áúd # QueuesÁ£úü§]Z [`Injector`] is a FIFO queue, where tasks are pushed and stolen from opposite ends. It isÁü…FC shared among threads and is usually the entry point for new tasks.ÁÌúüÐ$! [`Worker`] has two constructors:Áõúüù_\ * [`new_fifo()`] - Creates a FIFO queue, in which tasks are pushed and popped from oppositeÁ ends.Áüå_\ * [`new_lifo()`] - Creates a LIFO queue, in which tasks are pushed and popped from the sameÁ end.ÁÐúüÔZW Each [`Worker`] is owned by a single thread and supports only push and pop operations.Á¯ úü³ b_ Method [`stealer()`] creates a [`Stealer`] that may be shared among threads and can only stealÁü–
_\ tasks from its [`Worker`]. Tasks are stolen from the end opposite to where they get pushed.Áö
ú
 # StealingÁ úü +( Steal operations come in three flavors:Á¹ úü½ %" 1. [`steal()`] - Steals one task.Áüã VS 2. [`steal_batch()`] - Steals a batch of tasks and moves them into another worker.Áüº c` 3. [`steal_batch_and_pop()`] - Steals a batch of tasks, moves them into another queue, and popsÁüž
! one task from that worker.ÁÀ
úüÄ
b_ In contrast to push and pop operations, stealing can spuriously fail with [`Steal::Retry`], inÁü§74 which case the steal operation needs to be retried.Áßú # ExamplesÁòúüöb_ Suppose a thread in a work-stealing scheduler is idle and looking for the next task to run. ToÁüÙ63 find an available task, it might do the following:Áúü”85 1. Try popping one task from the local worker queue.ÁüÍDA 2. Try stealing a batch of tasks from the global injector queue.Áü’HE 3. Try stealing one task from another thread using the stealer list.ÁÛúüß52 An implementation of this work-stealing strategy:Áú<™ ```Áü¡52 use crossbeam_deque::{Injector, Stealer, Worker};Á”× use std::iter;Áêú¤î fn find_task<T>(ÁÔƒ local: &Worker<T>,Áìž global: &Injector<T>,Áü¼  stealers: &[Stealer<T>],Á¤Ý ) -> Option<T> {Áüò96 // Pop a task from the local queue, if not empty.Áü¬  local.pop().or_else(|| {ÁüÍ?< // Otherwise, we need to look for a task elsewhere.Áü" iter::repeat_with(|| {Áü°GD // Try stealing a batch of tasks from the global queue.Áüø1. global.steal_batch_and_pop(local)ÁüªLI // Or try stealing a task from one of the other threads.Áü÷MJ .or_else(|| stealers.iter().map(|s| s.steal()).collect())Á })ÁüÔYV // Loop while no task was stolen and any steal operation needs to be retried.Áü®$! .find(|s| !s.is_retry())ÁüÓ85 // Extract the stolen task, if there is one.ÁüŒ&# .and_then(|s| s.success())Á })Á’CÌúüÐ$! [`new_fifo()`]: Worker::new_fifoÁüõ$! [`new_lifo()`]: Worker::new_lifoÁüš" [`stealer()`]: Worker::stealerÁü½ [`steal()`]: Stealer::stealÁüÝ+( [`steal_batch()`]: Stealer::steal_batchÁü‰;8 [`steal_batch_and_pop()`]: Stealer::steal_batch_and_popÁü… ü¯6íÀÛŒ¹Äͺ½
X»Ù @¼}ƒ„ôz»À|¼‡"#$%8@Xopqrstuv}ˆŒÍ½§d handle_alloc_errorÁ” œ 43èØBoxÁL a$aá.
UnsafeCellÁTgî0 }
פ, PhantomDataÁ\¡ÉQíë MaybeUninitÁ\ÃÑÛµ ÚatomicÁ$÷] AtomicIsizeÁ\ýÝà AtomicPtrÁLН] AtomicUsizeÁ\•„Ä®¼ÀK¼†JepochÁ,àV4çpOwnedÁ,ïÆBackoffÁ<É CachePaddedÁ\¤!T7:
|@LUõøßâDxÖD†ËÄ”´·~tŒãbKN47øéëÖØ|ûÄÆª¬¤Áù!´ºù!üÜ"¬âù!„Ä¥&&ÍìÈ Òµ€AM¼~ZÇ'(\„%% ÈÍ%%ù!üÜ!¥**ÍW è Œ‚ ¥,,ÍW -/012üÖ !ù!”++
-È¡
ß þ
-<closure_kind>Á.<closure_signature>Á.<upvars>Á..-.Èù!ÑÛÑÛRÓÛuninitÁÝÔÛ»ÝÍõƒ«%9Ȭ)¼® <¸ ¬)++
/È üŸ+©ã ã˜X+ ¬+
0ÈÖüú:,„ä ä¤\åZ¬)+ Š+
1È$‹Ö,‘ü£5å å¤\åZ+ ²+
2ÈÖܨ¥44ÍW ­5Ù5äÊæ æ3 Ó3
5ÈÔ€¥77ÍW  ¥99ÍW ¹éîcÇî¸õ§:;<? "”Û88¤]¤]V¦]Á‚]üß3ø¤”&¤\ŒŒ 88Á`üà &88¤¤²T¦»¥¡¼»×ͬäppVrdataÁs »(xÑÑÄÌî ¥>>ÍW ó é?"?”Ž!$!ç çé¬)= !=
?È$!¤¥.œÓ' A worker queue.Áç'úüë'^[ This is a FIFO or LIFO queue that is owned by a single thread, but other threads may stealÁüÊ(UR tasks from it. Task schedulers typically create a single worker queue per thread.Á )út¤)þ>³)ú”·) A FIFO worker:ÁÊ)ú<Î)CüÖ))& use crossbeam_deque::{Steal, Worker};Á€*úü„* let w = Worker::new_fifo();ÁĤ* let s = w.stealer();Á½*útÁ* w.push(1);ÁtÐ* w.push(2);Átß* w.push(3);Áî*úüò*-* assert_eq!(s.steal(), Steal::Success(1));Áü +! assert_eq!(w.pop(), Some(2));ÁüÂ+! assert_eq!(w.pop(), Some(3));Á<ä+Cì+ú”ð+ A LIFO worker:Áƒ,ú<‡,Cü,)êd¹,úü½, let w = Worker::new_lifo();ÁÄÝ,Ñeö,útú,þet‰-•ft˜-¬f§-úü«--ÐfüÙ-!²güû-!‡g<.C4°.¥AAÍW ·.°79àŒ×12BCDE!üþ.!,þ.@@†J†JK‰Jµ 7ŠJphantomÁ7J¤7·0ØQd褤²T¦»¥¡¼»×ͬäéçEçEèEGlobalÁ ¿±‡§í#¼Ù/4Ù/@@á.á.aã.»Ì-IÜžB2®t˜04˜0@@±ìï0<ï0@@ÉQFu\»Ÿ ¬)ü¢1'¥GGÍW ®1ÌìÈ$±1°ŒÎ1¥IIÍW Ó1°JKLMOPQRSôÞ3üæ1  Creates a FIFO worker queue.Á2úü“230 Tasks are pushed and popped from opposite ends.ÁË2útÓ2þ>æ2ú<î2Cüú2  use crossbeam_deque::Worker;ÁŸ3úü§3&# let w = Worker::<i32>::new_fifo();Á<Ò3CDå3°HH
JÈô–9üŸ7  Creates a LIFO worker queue.ÁÄ7úüÌ72/ Tasks are pushed and popped from the same end.Áƒ8út8þ>ž8ú<¦8Cü²8 ¼o×8úüß8&# let w = Worker::<i32>::new_lifo();Á<Š9CD9°HH
KÈüþ>#ü×<%" Creates a stealer for this queue.Á=úü‰=@= The returned stealer can be shared among threads and cloned.ÁÎ=útÖ=þ>é=ú<ñ=Cüý= ¼o¢>úüª>& rÄÕ>Ñe<ò>C<…?è è°H ?H
LÈ$Ž?üå@'4ï@é é°ù!¬)H ö@H
MÈ$÷@new_capÁ<ý@<×GMƒYNYN¸YNNMNȲ"¬)¬)üüSharedÁÿÝ` De—è­×üñJ%<ôJê ê°ù!¬)H üJH
OÈ$ýJ reserve_capÁ\ƒKô¾SüÅQ)& Returns `true` if the queue is
 `£cbufÁ `àB¤GS
ñÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
¬)ŸÈŸÈ ÈErrorÁ O˜éBLU ˆƒU
WÈ$‰ƒ± ƒ¬¿‡üäƒ'$ A stealer handle of a worker queue.ÁŒ„úü)& Stealers can be shared among threads.Áº„úü¾„KH Task schedulers typically have a single worker queue per worker thread.ÁŠ…útŽ…þ>ú<¡…’Cü©…)êdÓ…úü×…Áht÷…þet††•f•†úÄ™†Ñeü²†-Ðfüà†-* assert_eq!(s.steal(), Steal::Success(2));Áüއ(% assert_eq!(s.steal(), Steal::Empty);Á<·‡C<ʇ¥YYÍW Ò‡°N°’"YZ[ ü™ˆ!,™ˆXX½ktâˆ4âˆXX±üõˆ(¥]]ÍW §n$„‰ü¡‰(¥__ÍW ­‰§n$°‰”Ή¥aaÍW Ó‰bcdefghôý‹üç‰)Èx•Šú<Š’Cü©Š ¼oΊúüÖŠÁhÄúŠÑe—‹úÔŸ‹ assert!(s.is_empty());Át¾‹þeÜÑ‹ assert!(!s.is_empty());Á<ñ‹CD„Œò ò` Œ`
bÈ$ŽŒÔ²üä-öz–Žú<žŽ’CüªŽ ¼oÏŽúü׎ÁhÄûŽÑe˜úÜ  assert_eq!(s.len(), 0);ÁþeÜÓ assert_eq!(s.len(), 1);Á•f܆ assert_eq!(s.len(), 2);ÁC¹ó óù!` ½`
cÈüŠ•ü ! Steals a task from the queue.ÁÆ’útÎ’þ>á’ú<é’’Cüõ’)êd£“úü«“ÁhtÏ“þetâ“•fõ“úÄý“Ñeüš”-ÐfüÌ”-̉<þ”’C,‘•ô ôà` —•`
dÈ$˜•ü”¦8üá @= Steals a batch of tasks and pushes them into another worker.Á¦¡úü®¡^[ How many tasks exactly will be stolen is not specified. That said, this method will try toÁü‘¢\Y steal around half of the tasks in the queue, but also not more than some constant limit.Áò¢útú¢þ>£ú<•£’Cü¡£ ¼oÆ£úüΣ  let w1 = Worker::new_fifo();Á|ó£ w1.push(1);Á|‡¤ w1.push(2);Á|›¤ w1.push(3);Á|¯¤ w1.push(4);ÁäúÌˤ let s = w1.stealer();Áüé¤  let w2 = Worker::new_fifo();ÁŽ¥úü–¥ let _ = s.steal_batch(&w2);Áüº¥" assert_eq!(w2.pop(), Some(1));Áüá¥" assert_eq!(w2.pop(), Some(2));Á<ˆ¦C\›¦õö õ ö°ÍÏÐÙÑÒëÓˆÔÕnÚP.ß~V¬)` §¦`
eÈ$¨¦destÁ$®¦üǰQü§MJ Steals no more than `limit` of tasks and pushes them into another worker.Áá§úüé§^š•ų̈XU steal around half of the tasks in the queue, but also not more than the given limit.Á©©út±©þ>Ä©ú<Ì©’CüØ© ¼oý©úü…ª ¹—|ªªã—|¾ªü—|Òª•˜|檮˜|úª w1.push(5);Á|Ž« w1.push(6);Á¢«ú̪«Ô˜üÈ« ø˜í«úüõ«-* let _ = s.steal_batch_with_limit(&w2, 2);Áü§¬"Ú™üά"‡šüõ¬ assert_eq!(w2.pop(), None);Á™­ú|¡­ w1.push(7);Á|µ­ w1.push(8);ÁüÉ­_\ // Setting a large limit does not guarantee that all elements will be popped. In this case,Áü­®a^ // half of the elements are currently popped, but the number of popped elements is consideredÁü“¯B? // an implementation detail that may be changed in the future.ÁüÚ¯;8 let _ = s.steal_batch_with_limit(&w2, std::usize::MAX);Áäš° assert_eq!(w2.len(), 3);Á<»°C´Î°÷ø ÷ ø°ù
 `£cõ„ `àB¤GS
œ†l ù¶l
nÈ$ú¶± €·”°¹,¶¹ù!ŒÈ¹$ιù!¤ß¹<å¹ù!„¥º«ºù!´îºLôºù!”»,È»ù!¬‹¼D‘¼ù!t¾¼$ż¥wwÍW ʼvvxyºi»—¾MÜ7_Èi»—¾MÜ7_xyRTüå¼ $å¼vvî0î0ˆQð0»Ì-·}—KEüC£åZ”«½,«½vv¤]¤]V¦]Á‚]üß3ø¤”&ù!|½¥{{ÍW ǽñ¶| 
¤¾T¾ ñ¶¬)z ›¾z
|È$œ¾|›À,¢À¥~~ÍW ¨Àº'»"Çk,âŠÖ!ÌÜÀ$ÜÀ}}¤]¤]V¦]Á‚]üß3ø¤”& º'Ü–Á,–Á}}ñ¶´ù!„¶Á¥ƒƒÍW »Áº'„¤ÍÁ4ÓÁþ*¬ÖÃÙÞâP¡ˆˆ¢ˆl }.xϺ'»l
ÈüýÉ$L€Ê º'ƒ» ŠÊ
È$‹ÊüèÌ4<ò̃»ù!¬)
ÈthisÁ$úÌü,Í”ŒÓD“Ó¥ÍW œÓˆˆ´ŠÖ¸Xt”µ_[ÈXt”µ_[ŠXZ”ÅÓ,ÅÓˆˆ¬¸Ô„Ô,„ÔˆˆÖº´Ø´£Ô An injector queue.ÁºÔúü¾Ôb_ This is a FIFO queue that can be shared among multiple threads. Task schedulers typically haveÁü¡ÕDA a single injector queue, which is the entry point for new tasks.ÁæÕútêÕþ>ùÕú<ýÕCü…Ö+( use crossbeam_deque::{Injector, Steal};Á±ÖúäµÖ let q = Injector::new();ÁtÒÖ q.push(1);ÁtáÖ q.push(2);ÁðÖúüôÖ-* assert_eq!(q.steal(), Steal::Success(1));Áü¢×-* assert_eq!(q.steal(), Steal::Success(2));ÁüÐ×(% assert_eq!(q.steal(), Steal::Empty);Á<ù×CDŒØ¥ÍW •ØêÌùfŸŽ¥%'ô½Ø$½ØŒŒ¤¤²T¦»¥¡¼»×ͬäö¾ôÙ$ÙŒŒ÷żóÙ<óÙŒŒÉQFu\»ŸÈüÚ)¥ÍW ›Ú§n$žÚêü¼Ú)¥ÍW ÈÚ§n$ËÚêüêÚ¥ÍW ïÚê´¤Û<“Ûê
ÈœÑÞ¥ÍW ÖÞêšœžŸ ¡¢#%Ü£àüëÞ! Creates a new injector queue.Á‘ßút™ßþ>¬ßú<´ßCüÀß" use crossbeam_deque::Injector;Áçßúüïß# let q = Injector::<i32>::new();Á<—àCªàꘘ
šÈÜ»âüäà!Ú}Šáút’áþ>¥áú<­áCü¹á"ÆÉàáúäèá let w = Injector::new();Át‰âþetœâ•f<¯â’C$Â⃠ƒêȬ)˜ Çâ˜
È$Èâ$Îâüý÷ü„õ!ƒ’ªõút²õþ>Åõú<Íõ’CüÙõ+¾Á‰öúä‘ö€Ât²ö¦ÂtÅö¾ÂØöúüàö-äÂü’÷-œÃüÄ÷(ÔÃ<ñ÷’C,„ø êà˜ Šø˜
œÈ$‹øü¾‘8ü·Œ:7 Steals a batch of tasks and pushes them into a worker.ÁöŒúüþŒ^š•üá\ƒ–ÂŽútÊŽþ>ÝŽú<åŽCüñŽ,) use crossbeam_deque::{Injector, Worker};Á¢ú䪀¦¾ q.push(3);Át„ q.push(4);ÁúüŸ©eôà let _ = q.steal_batch(&w);Áüæ!ÿ€üŒ‘!‡g<²‘C\Å‘ ê °ó›˜ Ñ‘˜
È$Ò‘é›$Ø‘ü›Q
 `£cõ„ `àB¤GS
œ†¦ ¬¦
¨È± ³„Ÿ¥¥ªªÍW ¤¥à«¬­®¯ôƒ¨ü¶¥B? Returns `true` if the queue was empty at the time of stealing.Áý¥út…¦þ>˜¦ú< ¦Cü¬¦85 use crossbeam_deque::Steal::{Empty, Retry, Success};Áé¦úüñ¦$! assert!(!Success(7).is_empty());Áüš§&# assert!(!Retry::<i32>.is_empty());Áŧúüͧ%" assert!(Empty::<i32>.is_empty());Á<÷§CDЍ à© “¨©
«È$”¨üÌ« üˆ©30 Returns `true` if at least one task was stolen.ÁÀ©útÈ©þ>Û©ú<ã©’Cüï©8êשׁúü´ª(% assert!(!Empty::<i32>.is_success());Áüáª(% assert!(!Retry::<i32>.is_success());ÁŽ«úü–«%" assert!(Success(7).is_success());Á<À«CTÓ« à© Þ«©
¬È$ß«ô¡¯üج>; Returns `true` if the steal operation needs to be retried.Á­út£­þ>¶­ú<¾­’CüÊ­8êúü®&# assert!(!Empty::<i32>.is_retry());Áüº®$! assert!(!Success(7).is_retry());Áã®úüë®%" assert!(Retry::<i32>.is_retry());Á<•¯CD¨¯ à© ±¯©
­È$²¯ü³!ü¦°74 Returns the result of the operation, if successful.Áâ°útê°þ>ý°ú<…±’Cü‘±8êïαúüÖ±-* assert_eq!(Empty::<i32>.success(), None);Áüˆ²-* assert_eq!(Retry::<i32>.success(), None);Áº²úü².+ assert_eq!(Success(7).success(), Some(7));Á<õ²C<ˆ³à‹ƒ©©
®È$³üïºTü”´<9 If no task was stolen, attempts another steal operation.ÁÕ´úüÝ´]Z Returns this steal result if it is `Success`. Otherwise, closure `f` is invoked and then:Á¿µúüǵ@= * If the second steal resulted in `Success`, it is returned.ÁüŒ¶]Z * If both steals were unsuccessful but any resulted in `Retry`, then `Retry` is returned.Áüî¶:7 * If both resulted in `None`, then `None` is returned.Á­·útµ·þ>È·ú<з’CüÜ·8êúü¡¸>; assert_eq!(Success(1).or_else(|| Success(2)), Success(1));Áüä¸96 assert_eq!(Retry.or_else(|| Success(2)), Success(2));Á¢¹úüª¹63 assert_eq!(Retry.or_else(|| Empty), Retry::<i32>);Áüå¹63 assert_eq!(Empty.or_else(|| Retry), Retry::<i32>);Á ºúü¨º63 assert_eq!(Empty.or_else(|| Empty), Empty::<i32>);Á<ãºC<öºàà©°°©Í쪄 þº–"ª„¬)¤®»ª„¬)˜"àDº»
¯Èª„$»± ‡»LNü¾¥²²ÍW ’¾à³Àc³ü³¾8¶¾˜ à  c cˆ¢cµ
 `£cõ„ `àB¤GS
˜œ†± º¾±
³È$»¾± Á¾ü¥À+¥µµÍW ªÀàÅLü¦ÂXü×À=: Consumes items until a `Success` is found and returns it.Á™Áúü¡ÁXU If no `Success` was found, but there was at least one `Retry`, then returns `Retry`.ÁüþÁ# Otherwise, `Empty` is returned.ÁL©Âšà´š··´Í쀊 ³ÂÇL€Šìà€ŠÈLà|íÂ
È€Šù$¶Â>@vvˆˆšš««\à&4å&±&Wyq$L6¾¿ÀÁ¿Á$™'½½±½½±$Ê'½½±½½±(¼&
±/3±ÄÙÄMO ±±Ã¼&Ã
Ę Ã&±(É&±ÇÀcÇ!#šœ š±  c cˆ¢cµ
 `£cõ„ `àB¤GS
œœ†ÆÉ&Æ
ÇıÊÐ&±ÉÉ!'< ±¬)ÈÐ&È
É…HÔ&±±Ì·ßÌ57žŸ ž± Ÿ±ËÔ&Ë
̹
–ŒÇ£üŠž+( Possible outcomes of a steal operation.Á¶žútºžþ>ÉžúüÍžIF There are lots of ways to chain results of steal operations together:Á—Ÿú<›ŸCü£Ÿ>; use crossbeam_deque::Steal::{self, Empty, Retry, Success};ÁâŸúüæŸMJ let collect = |v: Vec<Steal<i32>>| v.into_iter().collect::<Steal<i32>>();Á´ úü¸ :7 assert_eq!(collect(vec![Empty, Empty, Empty]), Empty);Áüó :7 assert_eq!(collect(vec![Empty, Retry, Empty]), Retry);Áü®¡DA assert_eq!(collect(vec![Retry, Success(1), Empty]), Success(1));Áó¡úü÷¡EB assert_eq!(collect(vec![Empty, Empty]).or_else(|| Retry), Retry);Áü½¢OL assert_eq!(collect(vec![Retry, Empty]).or_else(|| Success(1)), Success(1));Á<£C.\•£,У¥ÎÎÍW Ö£ànÚP.ß~VÏÐÑÒÔÕÐÒÓÈàÕFH,”¤üߣ0- The queue was empty at the time of stealing.ÁBÍÍàUWÍÍàü ¤.+ At least one task was successfully stolen.ÁÍÍ
ÒÈÈàÍÍíš Û¤ÍÍÈ,•¥üä¤,) The steal operation needs to be retried.Á>ÍÍàQSÍÍàH-ª£¥××ÍWà!;?¥ÙÙÍWOµßÈÈ-Ö£àÚ·ßÚvy ¡  à ¡àØ-ª£Ø
ÚÈó¹
ù.µ£¥ÜÜÍWÈ.Ö£àÝÝ58W]r¢ ¢à¬)Û.µ£Û
ÝÈÀ /¹£¥ßßÍWÕŠ È/Ö£àìï(0¿£¥ááÍW!ØÈ0Ö£àâÙâCFWY£ £ààà0¿£à
âȧ³-.{. /ÿ0µ: ;<"Q='µ>,¯?1]A6%C; ’ƒB¦ƒIGNêGS°FXþB] ´¦d`>i ò°p$<u §î|}8 Œúˆá7ø6 ƒ·—· Â4¥Å2ªÌ*¯)´†'¹ Þ‘Àx$Å í›Ì2"Ñ àÊØÌÝ Æ×äŽéþîhóxø ÿÊj ØB| ľ&ؾ.@ 4j