aboutsummaryrefslogtreecommitdiffstats
path: root/lib/backend/managers/Lifecycle.mli
blob: f8cec1a1c656ead1c994782060e63b9b6616537d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
type tree = Object.rnt_object_tree

(* A collected runtime object that still needs an external teardown: a session
   to close, and later a transaction to roll back. The caller drains these. *)
type disposal = {path: Concepts.Path.t; kind: Object.rnt_object_kind}

val monitor : tree -> Concepts.Path.t -> tree
val pin : tree -> Concepts.Path.t -> tree
val unpin : tree -> Concepts.Path.t -> tree
val is_eligible_for_gc : tree -> Concepts.Path.t -> bool
val contention : tree -> Concepts.Path.t -> bool

val unmonitor :
  tree -> Concepts.Path.t -> (tree * disposal BatFingerTree.t, Concepts.Condition.condition) result

val collect :
  tree -> Concepts.Path.t -> (tree * disposal BatFingerTree.t, Concepts.Condition.condition) result