package stdune

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Stdune.Global_lockSource

global lock shared between dune processes.

Before starting rpc, writing to the build dir, this lock should be locked.

Sourcemodule Lock_held_by : sig ... end
Sourceval lock : timeout:Time.Span.t option -> (unit, Lock_held_by.t) result

Attempt to acquire a lock. once a lock is locked, subsequent locks always succeed. Returns Ok () if the lock is acquired within timeout seconds, and Error () otherwise.

Sourceval lock_exn : timeout:Time.Span.t option -> unit
Sourceval unlock : unit -> unit

release a lock and allow it be re-acquired

Sourceval write_pid : Unix.file_descr -> unit
Sourceval at_exit : At_exit.t