Allocate a new node ID This is thread-safe and guaranteed to return unique IDs.
(&self)
| 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 { |
no outgoing calls