def close

mylsm-lsm-store@0.6.0.1 · src/scan/Snapshot.bend:1195

import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshot
import Base

1195# Closes a snapshot only after its final cursor reference has been released.
1196def close(lifecycle: Lifecycle) -> LifecycleDecision:
1197  match lifecycle:
1198    case Live{cursor_count}:
1199      match cursor_count:
1200        case 0n: Advanced{Closed{}}
1201        case 1n+rest: Busy{}
1202    case Closed{}: Invalid{}

Uses (3)

Used by (0)

No other definition uses this definition.