Files
boc/aamos-ledger-rust/target/release/deps/libatomic_waker-e06db732f25440fd.rlib
T

65 lines
22 KiB
Plaintext
Raw Normal View History

!<arch>
/ 0 0 0 0 224 `
D¶_ZN12atomic_waker11AtomicWaker4wake17hb286552d8620c7e4E_ZN12atomic_waker11AtomicWaker8register17h5338ffe790cc05b1E_ZN62_$LT$atomic_waker..AtomicWaker$u20$as$u20$core..fmt..Debug$GT$3fmt17h54dac7e1d6fdbabdE// 74 `
atomic_waker-e06db732f25440fd.atomic_waker.28794664bfb8ca11-cgu.0.rcgu.o/
lib.rmeta/ 0 0 0 644 17104 `
ELF·PA@@GNUÀrust
?#rustc 1.96.0 (ac68faa20 2026-05-25)ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁ AtomicUsizeÁ\§»portable-atomicÁÜôí AtomicWakerÁ º wakerÁWAITINGÁ REGISTERINGÁWAKINGÁæ 
AssertSyncÁregisterÁ wakeÁtakeÁ>×






ããWakerÁ䃸 È
4åê邳  ê º
ƒ}cê›Å·¿cýÌìý ýã    ³¿cÌì 0b01Á0b10ÁÌàFaÎÜ ¤]¤]V¦]Á‚]üß3ø¤”&ü¿Fo  Vî0î0
UnsafeCellÁð0»Ì-·}—KEüC£Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¿ ­G´Gü«E‰ù¡ÛÉŒÄ'ýž•P“õ0õ¬ŽGý$ÁEðRN<ñFt{
ƒ„àF
ŒÄ:Dªq$žG Û¼¿
|ŽG
õ0õ=½ ¢G±  +21+9ýðY½#õ´diüäAå%©¯ðî0î0Çð0»Ì-·}—KEüC£™]™]š]Align8Áœ]ˆ] ̲ˆ364¥M‡O žýò™ 7à
§¨Ù©ÙªÙ˫٬٭Ù̮ٯٰÙG±Ù²Ù³ÙF´ÙµÙ¶Ù×·ÙëÃQП¿— š ग़ Î$ÑŠàõ ⊠,Ã…˜½ý©¯2“ õ0ý&X
ç†X àõü‰†&iûÉ A€Ê   ðÿ £ ÷ /  ýÕ 9à
Ÿ¡
¡…Ž àýÿÿÿÿÿÿÿ‘ŠŽ SóŠ •åü–„) ”Ê  ¯† Ô†ü–‚Ýü¡…´üâ†ùÈãÞ Äħ„ùÊé `ªÄ6ý‚­ßû0­ )ê ýØ>O­ 1–ê ý«– âê^ùòä$Zû0õýδ1äT¿4Ê…ýîÿX ÛõÅä‘1 ý‚†X

ùÅÈàžÄÜ”†Ù ªÄû Ó
û0­ Ì
Ç
­ Ã
ýØŠ é Ú^ùðÉ%
õl¬‚ ý,¢‚üœ„#£„¸…Œ÷ ˜ ÿ 婯 ½÷ © ðWƒ,¥…º,â†ö4°„4Ÿ†\î‰\†Š4”Š4§Š
àWÉÔS õk
§¡
¡ýš 8
É
§¡
¡ý¢™ 8
§¡
¡ýј 8
§¡
¡ý˜ 7
Ÿ¡
¡ýöŽ 8
Ÿ¡
¡ý¦Ž 8³Ú
Ÿ¡
¡ýƒ 9
Ÿ¡
¡ý±Œ 9ÊÒ àð   à½½Ñ‹üš‹7Ö”¹‹ßŒÄÊõõ0õý$ª‹ðÊU( íÇî0×Å `F4íÃÀFÄÀG<õÁÀGÂÀÌ¿ÀÌÀÀËã Š„Ä
ü§ü>; `futures::task::AtomicWaker` extracted into its own crate.Á?útC # FeaturesÁRúüVGD This crate adds a feature, `portable-atomic`, which uses a polyfillÁüžHE from the [`portable-atomic`] crate in order to provide functionalityÁüçNK to targets without atomics. See the [`README`] for the [`portable-atomic`]Áü¶0- crate for more information on how to use it.ÁçúüëA> [`portable-atomic`]: https://crates.io/crates/portable-atomicÁü­[X [`README`]: https://github.com/taiki-e/portable-atomic/blob/main/README.md#optional-cfgÁahttps://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.pngÁ„¡ó íÈÇÉî0×È `FÇÃÀFÙÄÀGÇÁÀGÙÂÀÌÇ¿ÀÌÚÀÀËÇã ŠÆ„Ä
š´£L¿äÎz}Z]9<ŒŒüÍ´Ùüµ0- A synchronization primitive for task wakeup.ÁæúüêIF Sometimes the task interested in a given event will change over time.Áü´ NK An `AtomicWaker` can coordinate concurrent notifications with the consumerÁüƒ
LI potentially "updating" the underlying task to wake up. This is useful inÁüÐ
JG scenarios where a computation completes in another thread and wants toÁü› PM notify the consumer, but the consumer is in the process of being migrated toÁ¼ì  a new logical task.Á úüˆ PM Consumers should call `register` before checking the result of a computationÁüÙ JG and producers should call `wake` after producing the computation (thisÁü¤
LI differs from the usual `thread::park` pattern). It is also permitted forÁüñ
GD `wake` to be called **before** `register`. This results in a no-op.Á¹úü½QN A single `AtomicWaker` may be reused for any number of calls to `register` orÁ\ `wake`.Áú¬Ÿ # Memory orderingÁµúü¹JG Calling `register` "acquires" all memory "released" by calls to `wake`Áü„GD before the call to `register`. Later calls to `wake` will wake theÁüÌPM registered waker (on contention this wake might be triggered in `register`).Áúü¡OL For concurrent calls to `register` (should be avoided) the ordering is onlyÁüñ$! guaranteed for the winning call.Áú # ExamplesÁ©úü­NK Here is a simple example providing a `Flag` that can be signalled manuallyÁ¬ü when it is ready.Áú< ```Áüž  use futures::future::Future;Áü¿41 use futures::task::{Context, Poll, AtomicWaker};Á¼ô use std::sync::Arc;ÁüŒ&# use std::sync::atomic::AtomicBool;Áü³-* use std::sync::atomic::Ordering::Relaxed;Á´á use std::pin::Pin;Áøú”ü struct Inner {ÁÜ waker: AtomicWaker,ÁÄ« set: AtomicBool,ÁÊú¤Î #[derive(Clone)]Áäã struct Flag(Arc<Inner>);Áú|„ impl Flag {Áô” pub fn new() -> Self {Áü³! Flag(Arc::new(Inner {ÁüÕ*' waker: AtomicWaker::new(),Áü€,) set: AtomicBool::new(false),Á|­ }))ÁÇúôË pub fn signal(&self) {Áüê,) self.0.set.store(true, Relaxed);Áü—  self.0.waker.wake();ÁL¸Ñ5ý2ÈúÔÌ impl Future for Flag {ÁÌç type Output = ();Áúü…IF fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {ÁüÏA> // quick check to avoid registration if already done.Áü‘)& if self.0.set.load(Relaxed) {Áü»'$ return Poll::Ready(());Á
ñúüõ.+ self.0.waker.register(cx.waker());Á¤úü¨KH // Need to check condition **after** `register` to avoid a raceÁüôA> // condition that would result in lost notifications.Áü¶)Š9üà Poll::Ready(())Á¤€ } else {Áì• Poll::PendingÁí9Ñ5ý2ó/ý}cê›Å·
”ö  ðüŽ   ½¤ƒC<‰CÄåC\ëCœÖD4ÜD„óDýÔ«EäŠE Create an `AtomicWaker`.Á¸Eý
´÷ETýEÎìÌ÷E Â@$‰Fº@%Ì@º@/Ì@%Ì™F¿ü©W%üºG:7 Registers the waker to be notified on calls to `wake`.ÁùGúüHKH The new task will take place of any previous tasks that were registeredÁüÑHJG by previous calls to `register`. Any calls to `wake` that happen afterÁü IHE a call to `register` (as defined by the memory ordering rules), willÁüíILI notify the `register` caller's task and deregister the waker from futureÁü¾JIF notifications. Because of this, callers should ensure `register` getsÁüŒKC@ invoked with a new `Waker` **each** time they require a wakeup.ÁÔKúüÜKJG It is safe to call `register` with multiple other threads concurrentlyÁü«LGD calling `wake`. This will result in the `register` caller's currentÁì÷L task being notified once.Á™Múü¡MKH This function is safe to call concurrently, but this is generally a badÁüñMKH idea. Concurrent calls to `register` will attempt to register differentÁüÁNLI tasks to be notified. One of the callers will win and have its task set,Áü’O>; but there is no guarantee as to which caller will succeed.ÁÕOútÝOÎ.ðOúüøO<9 Here is how `register` is used when implementing a flag.Á¹Pú<ÁPó/üÍP „0üòP4®0ü«Q&Œ1üÖQ-¼1´ˆRò1£RúŒ«R struct Flag {ÁÜÁR¸2ÄáRÜ2,þRý2ˆSúÔSš7̯S½7ÍSúüÕSIì7ü£TKH // Register **before** checking `set` to avoid a race conditionÁüóT74 // that would result in lost notifications.Áü¯U,) self.waker.register(cx.waker());ÁàUúüèU'$ if self.set.load(Relaxed) {Áü”V<¤¸V©<ìÑVÆ<lóVí9L…WÑ5,“Wý2<Wó/D°W  ý  ¿ ¹W
$ºWƒ,ÀWÙX<closure_kind>Á<closure_signature>Á<upvars>ÁßO”¢~ü”}:7 Calls `wake` on the last `Waker` passed to `register`.ÁÓ}úüÛ}B? If `register` has not been called yet, then this does nothing.Á$©~! ßO ®~
$¯~ü–‚#ü‘PM Returns the last `Waker` passed to `register`, so that the user can wake it.Áæúîúüö[X Sometimes, just waking the AtomicWaker is not fine grained enough. This allows the userÁüÖ€[X to take the waker and then wake it separately, rather than performing both steps in oneÁ”¶ atomic action.ÁÍúüÕ<9 If a waker has not been registered, this returns `None`.Á$" õ ¢‚
$£‚ä÷Šý´¤š‹<ý
üÕ‹ýÀcüû‹8þ‹#$%  $ c cˆ¢cµ