GraphMutationEpoch
Description
Structural-mutation counter. Bumped by node/edge insertions, deletions, and commits; traversal helpers snapshot it to detect concurrent mutation.
Parameters
| Name | Direction | Description |
|---|---|---|
g |
in | Graph to query. |
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Insert.c:128:
size old_capacity = VecCapacity(&graph.slots);
u64 old_epoch = GraphMutationEpoch(&graph);
bool grew = GraphReserve(&graph, 1024);- In
Insert.c:134:
bool result = grew;
result = result && (VecCapacity(&graph.slots) > old_capacity);
result = result && (GraphMutationEpoch(&graph) > old_epoch);
GraphDeinit(&graph);- In
Insert.c:159:
(void)GraphCommitChanges(&graph);
u64 old_epoch = GraphMutationEpoch(&graph);
GraphNodeId reused = GraphAddNodeR(&graph, 99);- In
Insert.c:163:
bool result = (GraphNodeIdIndex(reused) == GraphNodeIdIndex(b));
result = result && (GraphMutationEpoch(&graph) > old_epoch);
GraphDeinit(&graph);- In
Type.c:34:
VecBegin(&graph.pending_edge_removals) == NULL && GraphCopyInit(&graph) == NULL &&
GraphCopyDeinit(&graph) == NULL && graph.pending_delete_count == 0 &&
GraphMutationEpoch(&graph) == 0 && GraphAllocator(&graph)->alignment == 1;
GraphDeinit(&graph);
Last updated on