You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubfnpush(&self,t:T){letmut n = Owned::new(Node{data:ManuallyDrop::new(t),next:Atomic::null(),});let guard = epoch::pin();loop{let head = self.head.load(Relaxed,&guard);matchself.head.compare_and_set(head, n,Release,&guard){ <- A
n.next.store(head,Relaxed);//<- if A or B are relaxed this operation can be here//it was before the compare_and_set originallyOk(_) => break,Err(e) => n = e.new,}}}
pubfn pop(&self) -> Option<T>{let guard = epoch::pin();loop{let head = self.head.load(Acquire,&guard);//<- B, if this load is relaxed //this head has a null next pointer because the pointer is set later
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: