package async_smtp
Module Make.Queue_readerSource
Interface for iteration and waiting on queue activity. Multiple processes will not interfere with one another.
Source
val iter :
?stop:unit Async.Deferred.t ->
f:
(S.Metadata.t ->
Data_file.t ->
[ `Save of S.Metadata.t * S.Queue.t | `Remove ] Async.Deferred.t) ->
t ->
unit Async.Deferred.Or_error.tIterate over entries in a queue and call f on each, and wait for a new entry if the list is exhausted.
Source
val iter_available :
f:
(S.Metadata.t ->
Data_file.t ->
[ `Save of S.Metadata.t * S.Queue.t | `Remove ] Async.Deferred.t) ->
t ->
unit Async.Deferred.Or_error.tIterate over entries in a queue and call f on each, if any are available. Do not wait.