package async
Module Lock_file_async.SymlinkSource
Symlink has async analogues of functions in Lock_file_blocking.Symlink; see there for documentation.
Additionally, here we:
- catch unix exceptions, packaging them as
Deferred.Or_error.t - implement abortable waiting versions based on polling
Source
val lock_exn :
lock_path:string ->
metadata:string ->
[ `Somebody_else_took_it of string Core.Or_error.t | `We_took_it of t ]
Async.Deferred.tSource
val lock :
lock_path:string ->
metadata:string ->
[ `Somebody_else_took_it of string Core.Or_error.t | `We_took_it of t ]
Async.Deferred.Or_error.tSource
val wait_for_lock_exn :
?abort:unit Async.Deferred.t ->
lock_path:string ->
metadata:string ->
unit ->
t Async.Deferred.twait_for_lock_exn ?abort ~lock_path () Wait for the lock, giving up once abort becomes determined
Source
val wait_for_lock :
?abort:unit Async.Deferred.t ->
lock_path:string ->
metadata:string ->
unit ->
t Async.Deferred.Or_error.tSee wait_for_lock_exn