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

Method alloc_node_id

atomic-core/src/pristine/txn/pristine.rs:303–305  ·  view source on GitHub ↗

Allocate a new node ID This is thread-safe and guaranteed to return unique IDs.

(&self)

Source from the content-addressed store, hash-verified

301 ///
302 /// This is thread-safe and guaranteed to return unique IDs.
303 pub fn alloc_node_id(&self) -> u64 {
304 self.next_node_id.fetch_add(1, Ordering::SeqCst)
305 }
306
307 /// Get the current next node ID (for testing/debugging)
308 pub fn peek_next_node_id(&self) -> u64 {

Callers 2

test_pristine_reopenFunction · 0.80
test_alloc_node_idFunction · 0.80

Calls

no outgoing calls

Tested by 2

test_pristine_reopenFunction · 0.64
test_alloc_node_idFunction · 0.64