MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / publish

Method publish

atomic-core/src/pristine/txn/write/mod.rs:64–75  ·  view source on GitHub ↗
(self, shared: &AtomicU64)

Source from the content-addressed store, hash-verified

62 }
63
64 fn publish(self, shared: &AtomicU64) -> bool {
65 match shared.compare_exchange(self.expected, self.next, Ordering::SeqCst, Ordering::SeqCst)
66 {
67 Ok(_) => true,
68 Err(actual) => {
69 if actual < self.next {
70 shared.fetch_max(self.next, Ordering::SeqCst);
71 }
72 false
73 }
74 }
75 }
76}
77
78fn allocate_shared_inode(next_inode: &AtomicU64) -> PristineResult<Inode> {

Calls

no outgoing calls