package async
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=74f2b7b01ce3b92289cc7a68cd3ae53885c763cedd320d27949d585e5c13dc64
md5=9f80cfb72e3defcc9fca50f67e23e93c
doc/async.lock_file_async/Lock_file_async/index.html
Module Lock_file_async
Lock_file_async is a wrapper that provides Async equivalents for Lock_file_blocking.
val create :
?message:string ->
?close_on_exec:bool ->
?unlink_on_exit:bool ->
string ->
bool Async.Deferred.tcreate ?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 Async.Deferred.tcreate_exn ?message path is like create except that it throws an exception on failure instead of returning a boolean value.
val waiting_create :
?abort:unit Async.Deferred.t ->
?message:string ->
?close_on_exec:bool ->
?unlink_on_exit:bool ->
string ->
unit Async.Deferred.twaiting_create path repeatedly tries to lock path, becoming determined when path is locked or raising when abort becomes determined. Similar to Lock_file_blocking.create.
val is_locked : string -> bool Async.Deferred.tis_locked path returns true when the file at path exists and is locked, false otherwise.
module Nfs : sig ... endNfs has analogs of functions in Lock_file_blocking.Nfs; see there for documentation. In addition to adding Deferred's, blocking_create was renamed waiting_create to avoid the impression that it blocks Async.
module Flock : sig ... endmodule Symlink : sig ... end