Module B000.Guard

Build operation guards.

A guard ensure that a build operation is allowed to proceed. This means either that:

Note. This module does not access the file system it trusts clients that call set_file_ready not to lie about its existence on the file system.

Guards

type t

The type for build operations guards.

val create : unit -> t

create () is a new guard.

val set_file_ready : t -> B0_std.Fpath.t -> unit

set_file_ready g f indicates to g that file f is ready, i.e. that it exists and is up-to-date.

val set_file_never : t -> B0_std.Fpath.t -> unit

set_file_never g f indicate to g that file f will never become ready.

val add : t -> Op.t -> unit

add g o guards o in g until it is allowed.

val allowed : t -> Op.t option

allowed g is an operation that is either ready or aborted in g (if any). In the second case the Op.status is Op.status.Aborted.