module Lock_file: Lock_file
val create : ?message:string ->
?close_on_exec:bool ->
?unlink_on_exit:bool -> string -> bool Import.Deferred.t
create ?message path
tries to create a file at path
containing the text message
,
pid if none provided. It returns true on success, false on failure. Note: there is
no way to release the lock or the fd created inside! It will only be released when
the process dies.
val create_exn : ?message:string ->
?close_on_exec:bool ->
?unlink_on_exit:bool -> string -> unit Import.Deferred.t
create_exn ?message path
is like create
except that it throws an exception on
failure instead of returning a boolean value
val waiting_create : ?message:string ->
?close_on_exec:bool ->
?unlink_on_exit:bool -> string -> unit Import.Deferred.t
wait_create ~path ~message
becomes determined when the file at
path
gets locked.
Equivalent to
Core.Lock_file.blocking_create
.
val is_locked : string -> bool Import.Deferred.t
is_locked path
returns true when the file at path
exists and is locked, false
otherwise.
module Nfs: sig
.. end