Files
guba-indicator/rust/target/debug/deps/libatomic_waker-37dc9b4ba20b5be1.rmeta

28 lines
13 KiB
Plaintext
Raw Normal View History

rust
<EFBFBD>3#rustc 1.93.1 (01f6ddf75 2026-02-11)<29><02><05><11><><EFBFBD>GȬx<C8AC>92X<32>l-5bed970bceb2abc5<63><02>L<><4C><EFBFBD><EFBFBD><EFBFBD>l<EFBFBD>E,<07>R<EFBFBD><52>-3d16dd14375d91ab<61><01>b\<5C><02><<3C>portable-atomic<69><63><EFBFBD><00><><02> AtomicWaker<65> <02> waker<65>WAITING<4E> REGISTERING<4E>WAKING<4E><02> 
AssertSync<EFBFBD>register<65> wake<6B>take<6B>><02>       <01>~<01>~<02><01>~<01><01>~.<2E><><EFBFBD>Qke8<01>  <01> <02> <01><00>#A<>G<EFBFBD><47><EFBFBD><01>`<01><01><><01><01><01><01>~    <01><01>`<01><><01>0<><00>0b01<30><00>0b10<31><02><>F
<02><>F <01><><<3C>F<00> 7<04><>G$<24>G
<01><><01>%
,|<7C>G <01>.<01><><01><><01><><02><01><><01><><02><01><><02>i<><69>Py<50>.<2E><01><0F><0F> <0C>G<00><>Fo
  <0C>G<04>G<01><>E<EFBFBD><01>$<24>E<01><><01><>b<01><>v<><01>Z<><E6BDA6>9wA_<01>.<01>.
UnsafeCell<EFBFBD><01>.<02><01>+<04><><16>_*3.<01>c<01>c<0F><17><00> <02><01>T<><01>.<02><1C><01>]F4<46><01><>F<01><>G<<3C><01><>G<01><><02><<3C><01><><02><01><><02>,<2C><01>~ b\<5C><01><>
<EFBFBD><00><><00>>; `futures::task::AtomicWaker` extracted into its own crate.<2E>?<02>tC # Features<65>R<02><00>VGD This crate adds a feature, `portable-atomic`, which uses a polyfill<6C><00><>HE from the [`portable-atomic`] crate in order to provide functionality<74><00><>NK to targets without atomics. See the [`README`] for the [`portable-atomic`]<5D><00><>0- crate for more information on how to use it.<2E><1C><02><00><>A> [`portable-atomic`]: https://crates.io/crates/portable-atomic<69><00><>[X [`README`]: https://github.com/taiki-e/portable-atomic/blob/main/README.md#optional-cfg<66><02><1C> <0C> <0C>8<02><00><> <0C>7ahttps://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png<6E><00><>c<01><><04><02><1C> <0C> <0C>8<02>l<> <0C>7<01><00><>c<01><><05> <02><01><01>.<02><01>]F <01><>F<01><>G <01><>G<01><><02> <01><><02> <01><><02> <01>~ b <01><>
<13><13><13><04><><13>L<><13><04><>8<13><13><17><17>~<17><04><>`<04><>V<04><><00><>0- A synchronization primitive for task wakeup.<2E><1C><02><00><>IF Sometimes the task interested in a given event will change over time.<2E><00><> NK An `AtomicWaker` can coordinate concurrent notifications with the consumer<65><00><>
LI potentially "updating" the underlying task to wake up. This is useful in<69><00><>
JG scenarios where a computation completes in another thread and wants to<74><00><> PM notify the consumer, but the consumer is in the process of being migrated to<74><00><>  a new logical task.<2E><1C> <02><00><> PM Consumers should call `register` before checking the result of a computation<6F><00><> JG and producers should call `wake` after producing the computation (this<69><00><> LI differs from the usual `thread::park` pattern). It is also permitted for<6F><00><> GD `wake` to be called **before** `register`. This results in a no-op.<2E><1C><02><00><>QN A single `AtomicWaker` may be reused for any number of calls to `register` or<6F>\<5C> `wake`.<2E><1C><02><00><> # Memory ordering<6E><1C><02><00><>JG Calling `register` "acquires" all memory "released" by calls to `wake`<60><00><>GD before the call to `register`. Later calls to `wake` will wake the<68><00><>PM registered waker (on contention this wake might be triggered in `register`).<2E><1C><02><00><>OL For concurrent calls to `register` (should be avoided) the ordering is only<6C><00><>$! guaranteed for the winning call.<2E><1C><02>t<> # Examples<65><1C><02><00><>NK Here is a simple example providing a `Flag` that can be signalled manually<6C><00><> when it is ready.<2E><1C><02><<3C> ```<60><00><>  use futures::future::Future;<3B><00><>41 use futures::task::{Context, Poll, AtomicWaker};<3B><00><> use std::sync::Arc;<3B><00><>&# use std::sync::atomic::AtomicBool;<3B><00><>-* use std::sync::atomic::Ordering::Relaxed;<3B><00><> use std::pin::Pin;<3B><1C><02><00><> struct Inner {<7B>܏ waker: AtomicWaker,<2C>ī set: AtomicBool,<2C>,<2C> }<7D><1C><02><00><> #[derive(Clone)]<5D><00><> struct Flag(Arc<Inner>);<3B><1C><02>|<7C> impl Flag {<7B><00><> pub fn new() -> Self {<7B><00><>! Flag(Arc::new(Inner {<7B><00><>*' waker: AtomicWaker::new(),<2C><00><>,) set: AtomicBool::new(false),<2C>|<7C> }))<29>L<> }<7D><1C><02><00><> pub fn signal(&self) {<7B><00><>,) self.0.set.store(true, Relaxed);<3B><00><>  self.0.waker.wake();<3B>L<><01>%,<2C><01>"<1C><02><00><> impl Future for Flag {<7B><00><> type Output = ();<3B><1C><02><00><>IF fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {<7B><00><>A> // quick check to avoid registration if already done.<2E><00><>)& if self.0.set.load(Relaxed) {<7B><00><>'$ return Poll::Ready(());<3B>l<>
}<7D><1C><02><00><>.+ self.0.waker.register(cx.waker());<3B><1C><02><00><>KH // Need to check condition **after** `register` to avoid a race<63><00><>A> // condition that would result in lost notifications.<2E><00><>)<01>(<00><> Poll::Ready(())<29><00><> } else {<7B><00><> Poll::Pending<6E>l<><01>)L<><01>%,<2C><01>"<<3C><01>\<5C><00><00>#A<>G<EFBFBD><47><EFBFBD> <0A><>,<2C>  <00><08><> ,<2C>  <00> <09><>C<<3C>C<00><06><>C\<5C>C<00><06><>D4<>D<00><06><>D<00>ԫE<00><>E Create an `AtomicWaker`.<2E><1C>E<01> <00><>ET<>E<01><><00><>E<01><01>0$<24>F<00>0%<00>0<00>0/<00>0%̙F<00><00><>W%<00><>G:7 Registers the waker to be notified on calls to `wake`.<2E><1C>G<02><00><>HKH The new task will take place of any previous tasks that were registered<65><00><>HJG by previous calls to `register`. Any calls to `wake` that happen after<65><00><>IHE a call to `register` (as defined by the memory ordering rules), will<6C><00><>ILI notify the `register` caller's task and deregister the waker from future<72><00><>JIF notifications. Because of this, callers should ensure `register` gets<74><00><>KC@ invoked with a new `Waker` **each** time they require a wakeup.<2E><1C>K<02><00><>KJG It is safe to call `register` with multiple other threads concurrently<6C><00><>LGD calling `wake`. This will result in the `register` caller's current<6E><00><>L task being notified once.<2E><1C>M<02><00><>MKH This function is safe to call concurrently, but this is generally a bad<61><00><>MKH idea. Concurrent calls to `register` will attempt to register different<6E><00><>NLI tasks to be notified. One of the callers will win and have its task set,<2C><00><>O>; but there is no guarantee as to which caller will succeed.<2E><1C>O<02>t<>O<01><1C>O<02><00><>O<9 Here is how `register` is used when implementing a flag.<2E><1C>P<02><<3C>P<01><00><>P <01> <00><>P4<01> <00><>Q&<01>!<00><>Q-<01>!<00><>R<01>!<1C>R<02><00><>R struct Flag {<7B><00><>R<01>"<00><>R<01>",<2C>R<01>"<1C>S<02>ԐS<01>&̯S<01>'<1C>S<02><00><>SI<01>'<00><>TKH // Register **before** checking `set` to avoid a race condition<6F><00><>T74 // that would result in lost notifications.<2E><00><>U,) self.waker.register(cx.waker());<3B><1C>U<02><00><>U'$ if self.set.load(Relaxed) {<7B><00><>V<01>+<00><>V<01>+<00><>V<01>,l<>V<01>)L<>W<01>%,<2C>W<01>"<<3C>W<01>D<>W  <1F>  <20> <0C>W $<24>W<01>,<2C>W<1C>X<closure_kind><3E><closure_signature><3E><upvars><3E><01><06><01>><3E><>~<00><>}:7 Calls `wake` on the last `Waker` passed to `register`.<2E><1C>}<02><00><>}B? If `register` has not been called yet, then this does nothing.<2E>$<24>~! !<21><00>> <0C>~ $<24>~<00><><EFBFBD>#<00><>PM Returns the last `Waker` passed to `register`, so that the user can wake it.<2E><1C><02><1C><02><00><>[X Sometimes, just waking the AtomicWaker is not fine grained enough. This allows the user<65><00>ր[X to take the waker and then wake it separately, rather than performing both steps in one<6E><00><><EFBFBD> atomic action.<2E>́<02><00>Ձ<9 If a waker has not been registered, this returns `None`.<2E>$<24><>" "<22><00> <0C><> $<24><><00><><EFBFBD><00><01><00><><EFBFBD><<3C><><01> <00>Ջ<00><01>`<00><><EFBFBD>8<1C><>#$% #<23> $<01>`<01>`<02><01>`<02> <01>]<01>`buf<75><01>]I<19><>̖<EFBFBD><CC96>%<01><><01><><01><><02><01><><02><01><><01><><02><01><><02><00>(<28>*<2A><>é<01>><01><><01><><01><><02> <00><19><>E=<3D>z <0C><> $<24><><02> <0C><><00><><EFBFBD> <00><00><><EFBFBD> <00>. <0C>W<17>
<17>X <0C><><14><>! >https://github.com/taiki-e/portable-atomic/blob/main/README.md<6D>(https://crates.io/crates/portable-atomic<69><01>README<4D><01>H<01>I<01>I<01><01>I<01><01>H<01>IR<>l<EFBFBD><6C>^<5E>R<18><><EFBFBD>G<EFBFBD><47>* ٍ/<2F>B<>Q׎,<2C><><EFBFBD>7>8.<19>_-<2D><0A>Zj@͇ De<44>*<2A>K<EFBFBD>f<EFBFBD><66>]Yp(=:<3A><>O<EFBFBD><4F><EFBFBD> <09><>#/<2F><><0F><>p<EFBFBD><70><EFBFBD><01><><EFBFBD><EFBFBD><EFBFBD><EFA8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*<18>H<EFBFBD><48><EFBFBD><EFBFBD><EFBFBD>y<><79><EFBFBD><<3C><>_<EFBFBD><5F>_><3E>ߨZ<DFA8><18><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̋n<CC8B>M<EFBFBD>h{<7B>t<EFBFBD><74>+<2B><>D7Ҍ&<26><EFBFBD><E1868B><13><><06><>)<29>><3E><<3C>/h<><68><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD>\<5C><>O<EFBFBD><4F><EFBFBD>р<EFBFBD>@'tyN<79><4E>qT<14><>8r*<2A>06"[^D<>f<EFBFBD>F<><46>5Is5š<35><C29A><EFBFBD><EFBFBD>Ľ<EFBFBD>w}v<><76><EFBFBD>q,<2C><15>8<EFBFBD>c\˔ߕ3]<5D>e4<65>%<25>+<1A><><EFBFBD>N<EFBFBD><4E><EFBFBD>x>7<> B<>-B<><42><EFBFBD>Q<EFBFBD><00><00>W$<24> X <00>R <09><16><16><16><16><16>g<17><17>2"<1F><1F> <20>"<22>"<22>"<22>"$$$<24><00><00><00><17><00>"<00>"$0$ <18>e<16><16><16><16><16>Im<00>T H"<00>"#R] c f m t y  <09> <09> <09> <09> <09><16><16><16><16><16> c<17><17><1F><1F> |"<22>"<22>"<22>" $$1$5$;$@$E$I$P$` j q | <09> <09> <09> <09> a<16><16><16><16><16>3i<00>> 1"<00>"<00>"4$9$>$C$G$N$U$l<16><16><16><16><16><16>Y<17><17><1F>w l"<22>"<22>"<22>"<22>#$,$f<16><16><16><16><16><16>Qo<17><17>4k _"<22>"<22>"<22>"<22>#$&$n<16><16><16><16><16>_<00> <1F>{ p"<22>"<22>"<22>"<22>#$.$fJ<00>U I"<00>"#J<00>U I"<00>"#7<00>"B 6"<00>"<00>"<00><00>$.9<00>v<02><02>}]<00><02><02><00><02><02>c t"<00>"<00>#<00><17>_<00>g<17><00>"<00>"$$$|p<16><00><00><00><00><00><00><00><00><00><00><00><00><00>'48?PTcgr}<01><01><01><01><01><01><01><01><01><01><01><01>~ <00>"<00>"X$
<00><17><00>"<00>"$0$" & G K <02> R<>l<EFBFBD><6C>^<5E>R<15><>Z<EFBFBD>`*<2A><02>-O-S-w-g-<2D>-<2D>ODHT &@<02><>Yp(=:<3A><>O<><4F><EFBFBD> <09><> <00>)<29>><3E><<3C>/<00><><EFBFBD>\<5C><>O<EFBFBD>-<2D><0A>Z<18><><EFBFBD>G<EFBFBD><47>*<00>̋n<CC8B>M<EFBFBD>h#/<2F><><0F><>p
<><EFA8BD><EFBFBD><EFBFBD><EFBFBD> c\˔ߕ3!<00><>р<EFBFBD>@'t7>8.<19>_<00><><EFBFBD><01><><EFBFBD><EFBFBD> <00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<1A><><EFBFBD>N<EFBFBD><4E>#"[^D<>fj@͇ De<44>h<><68><EFBFBD><EFBFBD>;<3B><>5š<35><C29A><EFBFBD><EFBFBD><EFBFBD>R<>l<EFBFBD><6C>^<5E>R*<2A>K<EFBFBD>f<EFBFBD><66>]D7Ҍ&<26><><EFBFBD>><3E>ߨZ<DFA8><00>*<18>H<EFBFBD><48> <00><>8r*<2A>06-B<><42><EFBFBD>Q<EFBFBD>%<00>Q׎,<2C><><EFBFBD> ٍ/<2F>B]<5D>e4<65>%<25>"yN<79><4E>qT<00>x>7<> B<>$<00><><EFBFBD><13><><06><00><>w}v<><76><EFBFBD>{<7B>t<EFBFBD><74>+<2B><><<3C><>_<EFBFBD><5F>_<00><><EFBFBD>y<><79><EFBFBD>q,<2C><15>8<EFBFBD> <00>F<><46>5IsCPa<><61>-4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<EFBFBD><38><EFBFBD><EFBFBD>s:<3A><> zOx<4F>3<EFBFBD>t<EFBFBD>vb)<29>.C mk<6D><6B>!Q
<EFBFBD>G<EFBFBD>KAtt<00>9<EFBFBD><39><EFBFBD>CPa<><61>-4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8dC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\atomic-waker-1.1.2\src\lib.rs<72> ֭<>XZ<58><5A><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><04><><EFBFBD><EFBFBD><EFBFBD>IfU/UV<55><56>b1G<00><><01><><01>?HIO1B\ {x>)%$"1JOMKQQKMHR KHQP%O!5'."+-
-!
JB*(/LB* 
&NO:ICMKNQPL8QP*MQP4OQMON7PNOJQJG# MNQMP-PLMCKQPL+$8LMQOOQ9O5NO9G!O!!'"%.*
?POMQNHOL"PPQCA %9+2 
NP<1,$"
,F#
>[/MFNO1QQPOS##R #ONCM?)OHI)LT*MVRTT>NNN7RS*FLBBB+@C!%DLPQBP'V
?G+
U``A*OK846C$8G$KQ]
"?!$H<19>\?:F <09>A<EFBFBD><41> 1x86_64-pc-windows-msvc<76><63>^0<>Cd<43>ސ6f<36>I<EFBFBD><18> atomic_waker<65>-37dc9b4ba20b5be1<65>R<EFBFBD>l<EFBFBD><6C>^<5E>R<02>fR<01><05><00>E&<00><< $]<&]&&:&LL>>>W::>&"&&""W(>  &L :<02><01> rust-end-file