Index of values


(>>>) [Deferred.Infix]

A
abort [Clock_event]
abort [Clock.Event]
add [Jobs]
add [Events]
add t ~at value adds a new event e to t with the specified value, and returns `Ok e.
add_job [Scheduler]
add_job [Import.Basic_scheduler]
add_job [Raw_scheduler]
advance_clock [Events]
advance_clock t ~to_ advances the clock to to_, and returns `Ok values, with values for all events in t with at <= to_.
after [Std]
after [Clock]
after span returns a deferred d that will become determined after the span of time passes.
after_event [Clock]
all [Deferred_intf.Deferred_sequence]
all [Deferred]
all ts returns a deferred that becomes determined when every t in ts is determined.
all_unit [Deferred_intf.Deferred_sequence]
all_unit [Deferred]
Like all, but ignores results of the component deferreds
append [Async_stream]
append t1 t2 returns a stream with all the values of t1, in order, and if t1 ends, these values are followed by all the values of t2.
at [Std]
at [Events.Event]
at [Clock_event]
at [Clock]
at time returns a deferred d that will become determined as soon as possible after the specified time.
at_event [Clock]
at_intervals [Clock]
at_intervals ~stop span returns a stream whose elements will become determined span time apart.
at_varying_intervals [Clock]
at_varying_intervals ~stop f returns a stream whose next element becomes determined by calling f () and waiting for that amount of time, and then looping to determine subsequent elements.
available_now [Async_stream]
available_now t returns t prefix of t that is available now, along with the rest of the stream.

B
backtrace_history [Execution_context.Fields]
backtrace_history [Execution_context]
bin_read_t [Ivar]
bin_read_t_ [Ivar]
bin_read_t__ [Ivar]
bin_reader_t [Ivar]
bin_size_t [Ivar]
bin_t [Ivar]
bin_write_t [Ivar]
bin_write_t_ [Ivar]
bin_writer_t [Ivar]
bind [Raw_deferred.Scheduler_dependent]
block_group [Execution_context.Fields]
block_group [Execution_context]
bogus [Raw_monitor]
bogus [Execution_context]
bogus [Block_group]
both [Deferred]
both t1 t2 becomes determined after both t1 and t2 become determined.

C
catch [Std]
catch [Monitor]
catch ?name f runs f () inside a new monitor m and returns the first error raised to m.
catch_stream [Monitor]
catch_stream ?name f runs f () inside a new monitor m and returns the stream of errors raised to m.
check_invariant [Pipe]
check_invariant, if true, will cause pipes' invariants to be checked at the start of each operation.
choice [Deferred_std]
choice [Deferred]
choose [Deferred_std]
choose [Deferred]
choose choices is enabled choices >>| (fun f -> List.hd_exn (f ())).
choose_ident [Deferred_std]
choose_ident [Deferred]
choose_ident l = choose (List.map l ~f:(fun t -> choice t ident)).
clear [Pipe]
clear reader consumes all of the values currently in reader, and all blocked flushes become determined with `Ok.
close [Pipe]
close t closes the write end of the pipe:
close_exn [Tail]
close_exn t closes t.
close_if_open [Tail]
close_if_open t closes t, if it's not already closed.
close_read [Pipe]
closed [Pipe]
closed t returns a deferred that becomes determined when close t or close_read t is called.
closed [Async_stream]
closed t returns a deferred that becomes determined when the end of t is reached.
collect [Tail]
collect t returns the stream starting at the current position of the tail (i.e.
collect [Raw_tail]
concat [Pipe]
concat inputs return a reader, output, with the values from each pipe in inputs in sequence.
concat [Async_stream]
concat t takes a stream of streams and produces a stream that is the concatenation of each stream in order (you see all of stream 1, then all of stream 2...
connect [Raw_ivar.Scheduler_dependent]
copy_to_tail [Async_stream]
copy_to_tail t tail reads elements from t and puts them in tail, until the end of t is reached.
create [Unregister]
create [Throttle.Sequencer]
create a new monitor with the specified initial state
create [Throttle.Job]
create [Throttle]
create ~continue_on_error ~max_concurrent_jobs returns a throttle that will runs up to max_concurrent_jobs concurrently.
create [Tail]
create () returns a new tail.
create [Pipe]
create () creates a new pipe.
create [Monitor]
create () returns a new monitor whose parent is the current monitor
create [Jobs]
create [Job]
create [Ivar]
create () returns an empty ivar.
create [Handler]
create k creates a handler by coupling the continuation k together with the evaluation context that is current at the time create is called.
create [Events]
create [Deferred]
create f calls f i, where i is empty ivar.
create [Execution_context.Fields]
create [Raw_monitor.Fields]
create [Raw_ivar]
create [Raw_deferred]
create [Raw_tail]
create [Block_group]
create [Async_stream]
create f returns a stream t and calls f tail, where the elements of the stream are determined as the tail is extended, and the end of the stream is reached when the tail is closed.
create_full [Raw_ivar]
create_job [Raw_handler]
create_like [Execution_context]
current [Monitor]
current () returns the current monitor
current_execution_context [Scheduler]
current_execution_context [Import.Basic_scheduler]
current_execution_context [Raw_scheduler]
cycle_count [Scheduler]
cycle_num_jobs [Scheduler]
cycle_start [Scheduler]
cycle_times [Scheduler]

D
debug [Debug]
debug [Raw_scheduler]
debug_space_leaks [Deferred]
Set debug_space_leaks to Some n to trigger assertion failures when single deferred has more than n handlers waiting for it to be filled.
debug_space_leaks [Raw_ivar]
drain [Pipe]
drain reader repeatedly reads values from reader and throws them away.
drain_and_count [Pipe]

E
enabled [Deferred]
enabled [choice t1 f1; ... choice tn fn;] returns a deferred d that becomes determined when any of the ti become determined.
enqueue [Throttle.Sequencer]
schedule a state-accessing operation
enqueue [Throttle]
enqueue' [Throttle]
enqueue t ~monitor job schedules job to be run as soon as possible.
enqueue_job [Throttle]
equal [Pipe]
equal on pipes is physical equality.
equal [Ivar]
equal t t' is physical equality of t and t'.
equal [Raw_ivar]
error [Monitor]
error t returns a deferred that becomes defined if the monitor ever sees an error.
errors [Monitor]
errors t returns a stream of all subsequent errors that monitor t sees.
errors [Raw_monitor.Fields]
errors [Raw_monitor]
events [Clock_event]
every [Std]
every [Clock]
every ?start ?stop span f is every' ?start ?stop span (fun () -> f (); Deferred.unit)
every' [Clock]
every' ?start ?stop span f runs f() every span amount of time starting when start becomes determined and stopping when stop becomes determined.
execution_context [Job]
exists [Execution_context.Fields]
exists [Raw_monitor.Fields]
extend [Tail]
extend t v extends the stream, and will raise an exception if t has been closed.
extract_exn [Monitor]
extract_exn exn extracts the exn from an error exn that comes from a monitor.

F
fill [Ivar]
fill t v fills t with value v if t was empty.
fill [Raw_ivar.Scheduler_dependent]
fill_if_empty [Ivar]
fill_if_empty t v fills t with v if t is currently empty.
filter [Raw_handler]
filter [Pipe]
filter input ~f returns a reader, output, and copies to output each element from input that satisfies the predicate f.
filter [Handler]
filter h ~f makes the eventual execution of the handler h on a value v dependent on whether predicate f holds of v
filter [Deferred_intf.Deferred_sequence]
filter [Async_stream]
filter s ~f returns a stream with one element, v, for each v in s such with f v = true.
filter' [Async_stream]
filter' s ~f returns a stream with one element, v, for each v in s such with f v = true.
filter_map [Pipe]
filter_map [Deferred_intf.Deferred_sequence]
filter_map [Async_stream]
filter_map s ~f returns a stream with one element, v', for each v in s such with f v = Some v'.
filter_map' [Pipe]
filter_map' input ~f returns a reader, output, and repeatedly applies f to elements from input, with the results that aren't None appearing in output.
filter_map' [Async_stream]
filter_map' s ~f returns a stream with one element, v', for each v in s such with f v = Some v'.
filter_mapi [Deferred_intf.Deferred_map]
find [Async_stream]
find ~f t returns a deferred that becomes determined when f x is true for some element of t, or if the end of the stream is reached
fire [Clock_event]
first_exn [Async_stream]
first_exn t returns a deferred that becomes determined with the first element of t.
first_n [Async_stream]
first_n t n returns a stream with the first n elements of t, if t has n or more elements, or it returns t.
flushed [Pipe]
flushed t becomes determined when all values written prior to the call to flushed have been removed from the pipe and handed to a reader, or if the reader end of the pipe is closed.
fold [Pipe]
fold [Deferred_intf.Deferred_sequence]
fold [Execution_context.Fields.Direct]
fold [Execution_context.Fields]
fold [Raw_monitor.Fields.Direct]
fold [Raw_monitor.Fields]
fold [Async_stream]
fold t ~init ~f is a variant of fold' in which f does not return a deferred.
fold' [Pipe]
fold' reader ~init ~f reads a batch of elements from reader, supplies them to f, waits for f to finish, and then repeats.
fold' [Async_stream]
fold' t ~init ~f is like list fold, walking over the elements of the stream in order, as they become available.
for_all [Execution_context.Fields]
for_all [Raw_monitor.Fields]

G
get [Jobs]
get t gets all the jobs with the highest priority currently available, subject to max_num_jobs_per_priority.

H
handle_errors [Monitor]
handle_errors ?name f handler runs f () inside a new monitor with the optionally supplied name, and calls handler error on every error raised to that monitor.
has_seen_error [Monitor]
has_seen_error t returns true iff the monitor has ever seen an error.
has_seen_error [Raw_monitor.Fields]
has_seen_error [Raw_monitor]
hash [Pipe]
hash a hash function suitable for pipes

I
id [Raw_monitor.Fields]
id [Raw_monitor]
initialize_execution_context [Scheduler]
install [Handler]
install h d behaves like upon except that it also returns a uninstall function that, when called, uninstalls the handler
install_removable_handler [Raw_ivar.Scheduler_dependent]
install_removable_handler [Raw_deferred.Scheduler_dependent]
interleave [Pipe]
interleave inputs returns a reader output, and, for each input, transfers batches of values from that input to output, using transfer_id.
interleave [Async_stream]
interleave list takes a stream of streams and returns a stream of their items interleaved as they become determined.
invariant [Throttle]
invariant [Scheduler]
invariant [Pipe.Reader]
invariant [Pipe.Writer]
invariant [Events]
invariant [Raw_scheduler]
invariant [Block_group]
is_closed [Tail]
is_closed t returns true iff the stream t is closed.
is_closed [Pipe]
is_closed t returns true iff close t or close_read t has been called.
is_determined [Deferred]
is_determined t returns true iff t is determined.
is_determined [Raw_deferred]
is_empty [Jobs]
is_empty t returns true if there are no waiting jobs.
is_empty [Ivar]
is_empty t returns true if t is empty
is_empty [Events]
is_empty [Raw_ivar]
is_full [Ivar]
is_full t returns true if t is full
is_full [Raw_ivar]
iter [Pipe]
iter [Events]
iter [Deferred_intf.Deferred_sequence]
iter [Execution_context.Fields.Direct]
iter [Execution_context.Fields]
iter [Raw_monitor.Fields.Direct]
iter [Raw_monitor.Fields]
iter [Async_stream]
iter t ~f = whenever (iter' t ~f:(fun a -> f a; Deferred.unit))
iter' [Pipe]
iter' reader ~f repeatedly applies f to batches of elements of reader, waiting for each call to f to finish before continuing.
iter' [Async_stream]
iter' t ~f applies f to each element of the stream in turn, as they become available.
iter_durably [Async_stream]
iter_durably' [Async_stream]
iter_durably_report_end t ~f is equivalent to iter_durably' t ~f:(fun x -> return (f x)) but it is more efficient
iter_durably_report_end [Async_stream]
iter_without_pushback [Pipe]

L
length [Pipe]
length t returns the number of elements currently queued in t
length [Jobs]
length t returns the number of waiting jobs
length [Async_stream]
length s returns a deferred that is determined when the end of s is reached, taking the value of the number of elements in s
log [Debug]
log_string [Debug]
low [Priority]
low [Jobs.Priority]

M
main [Monitor]
main_execution_context [Scheduler]
make_creator [Execution_context.Fields]
make_creator [Raw_monitor.Fields]
map [Pipe]
map [Deferred_intf.Deferred_sequence]
map [Execution_context.Fields]
map [Raw_monitor.Fields]
map [Async_stream]
map t ~f creates a new stream that with one element, (f v), for each element v of t.
map' [Pipe]
map' input ~f returns a reader, output, and repeatedly applies f to batches of elements from input, with the results appearing in output.
map' [Async_stream]
map' t f creates a new stream that with one element, (f v), for each element v of t.
map_poly [Execution_context.Fields]
map_poly [Raw_monitor.Fields]
monitor [Execution_context.Fields]
monitor [Execution_context]

N
name [Monitor]
name t returns the name of the monitor, or a unique id if no name was supplied to create.
name_opt [Raw_monitor.Fields]
name_opt [Raw_monitor]
names [Execution_context.Fields]
names [Raw_monitor.Fields]
never [Deferred_std]
never [Deferred]
never () returns a deferred that never becomes determined
next [Raw_async_stream]
next [Raw_stream]
next [Async_stream]
next_upcoming [Events]
next_upcoming t returns the next upcoming event in t, if any.
next_upcoming_event [Scheduler]
noop [Unregister]
normal [Priority]
normal [Jobs.Priority]
now [Events]
num_jobs_run [Scheduler]
num_pending_jobs [Scheduler]

O
of_fun [Async_stream]
of_fun f returns a stream whose elements are determined by calling f forever.
of_ivar [Raw_deferred]
of_list [Pipe]
of_list l returns a closed pipe reader filled with the contents of l.
of_list [Async_stream]
of_list l returns a stream with the elements of list l.
of_stream [Pipe]
of_stream reader return a pipe that has one element for every element on the stream
ounit_tests [Unregister]
ounit_tests [Test]
ounit_tests [Throttle]
ounit_tests [Tail]
ounit_tests [Std]
ounit_tests [Scheduler]
ounit_tests [Raw_handler]
ounit_tests [Raw_async_stream]
ounit_tests [Priority]
ounit_tests [Pipe]
ounit_tests [Monitor]
ounit_tests [Jobs]
ounit_tests [Job]
ounit_tests [Ivar]
ounit_tests [Import]
ounit_tests [Handler]
ounit_tests [Events]
ounit_tests [Deferred_std]
ounit_tests [Deferred_intf]
ounit_tests [Deferred]
ounit_tests [Debug]
ounit_tests [Raw_clock_event]
ounit_tests [Raw_stream]
ounit_tests [Raw_ivar]
ounit_tests [Raw_deferred]
ounit_tests [Raw_tail]
ounit_tests [Raw_monitor]
ounit_tests [Execution_context]
ounit_tests [Raw_scheduler]
ounit_tests [Clock_event]
ounit_tests [Clock]
ounit_tests [Block_group]
ounit_tests [Async_stream]
sexp_of_t t f returns a sexp of all of the elements currently available in the stream.

P
parent [Raw_monitor.Fields]
parent [Raw_monitor]
peek [Deferred]
peek t returns Some v iff t is determined with value t.
peek [Raw_ivar]
peek [Raw_deferred]
prepend [Raw_handler]
prepend [Handler]
prepend h ~f pre-composes the handler with the function f
prior_jobs_done [Throttle]
priority [Execution_context.Fields]
priority [Execution_context]
protect [Monitor]
protect f ~finally runs f () and then finally regardless of the success or failure of f.
pushback [Pipe]
pushback writer becomes determined when either writer has been closed or the pipe is empty.

R
read [Pipe]
read pipe reads a single value from the pipe.
read [Ivar]
read t returns a deferred that becomes enabled with value v after the ivar is filled with v.
read' [Pipe]
read' pipe reads all of the values available in the pipe, as soon as any value becomes available.
read_all [Pipe]
read_all reader reads all the values from the pipe until it is closed.
read_at_most [Pipe]
read_at_most r ~num_values reads up to num_values values from the pipe's currently available data, blocking if the pipe is empty.
read_exactly [Pipe]
read_exactly r ~num_values reads exactly num_values items, unless EOF is encountered.
read_now [Pipe]
read_now reader reads all of the values from reader that are immediately available.
record_backtrace [Execution_context]
record_backtraces [Debug]
When RECORD_ASYNC_BACKTRACES is set, the Async scheduler records a backtrace everytime it schedules a job, and will include the backtrace history in any exceptions raised to monitors, and in particular, in an unhandled exception that reaches the main monitor.
remove [Events]
remove t event removes event from t and returns `Removed, if event is present in t, else it returns `Not_present.
repeat_until_finished [Deferred]
repeat_until_finished initial_state f repeatedly runs f until f returns `Finished.
result [Throttle.Job]
return [Deferred_std]
return [Raw_deferred]
run [Job]
run_cycle [Scheduler]
run_cycles_until_no_jobs_remain [Scheduler]

S
schedule [Std]
schedule [Scheduler]
schedule [Monitor.Exported_for_scheduler]
schedule [Handler]
schedule h v schedules the handler h to run at some point in the future by being called on value v
schedule' [Std]
schedule' [Scheduler]
schedule' [Monitor.Exported_for_scheduler]
send_exn [Monitor]
send_exn t exn ?backtrace sends the exception exn as an error to be handled monitor t.
set_execution_context [Raw_scheduler]
set_has_seen_error [Raw_monitor]
set_max_num_jobs_per_priority_per_cycle [Scheduler]
set_size_budget [Pipe]
set_size_budget t i changes the size budget of t to i.
set_someone_is_listening [Raw_monitor]
sexp_of_detailed [Ivar]
sexp_of_detailed [Deferred]
sexp_of_detailed [Raw_ivar.Scheduler_dependent]
sexp_of_detailed [Raw_deferred.Scheduler_dependent]
sexp_of_one [Raw_monitor.Pretty]
sexp_of_pipe [Pipe]
sexp_of_state [Raw_clock_event.T]
sexp_of_t [Throttle]
sexp_of_t [Tail]
sexp_of_t [Raw_async_stream]
sexp_of_t [Priority]
sexp_of_t [Pipe.Reader]
sexp_of_t [Pipe.Writer]
sexp_of_t [Pipe]
sexp_of_t [Monitor]
sexp_of_t [Jobs.Priority]
sexp_of_t [Jobs]
sexp_of_t [Ivar]
sexp_of_t [Import.Basic_scheduler.Execution_context]
sexp_of_t [Events.Event]
sexp_of_t [Events]
sexp_of_t [Deferred]
sexp_of_t [Raw_scheduler.T]
sexp_of_t [Raw_clock_event.T]
sexp_of_t [Raw_monitor.Pretty]
sexp_of_t [Raw_stream]
sexp_of_t [Raw_ivar.Scheduler_dependent]
sexp_of_t [Raw_ivar]
sexp_of_t [Raw_deferred.Scheduler_dependent]
sexp_of_t [Raw_tail]
sexp_of_t [Raw_monitor]
sexp_of_t [Execution_context]
sexp_of_t [Clock_event]
sexp_of_t [Block_group.Work]
sexp_of_t [Block_group]
sexp_of_t [Async_stream]
sexp_of_t t f returns a sexp of all of the elements currently available in the stream.
sexp_of_tail [Raw_scheduler]
sexp_of_waiting [Raw_clock_event.T]
show_debug_messages [Pipe]
show_debug_messages, if true will cause a message to be printed at the start of each operation, showing the pipe and other arguments.
size_budget [Pipe]
Every pipe has a "size budget", which governs the pushback that is used to discourage writers from enqueueing arbitrarily large amounts of data.
someone_is_listening [Raw_monitor.Fields]
someone_is_listening [Raw_monitor]
split [Async_stream]
split ~stop ~f t returns a pair (p, d), where p is a prefix of t that ends for one of three reasons: 1.
start_cycle [Jobs]
start_cycle t ~max_num_jobs_per_priority enables subsequent calls of get to return up to max_num_jobs_per_priority jobs of each priority level.
status [Clock_event]
status [Clock.Event]

T
t [Raw_scheduler]
take_until [Async_stream]
take_until t d returns a stream t' that has the same elements as t up until d becomes determined.
to_list [Pipe]
to_list input reads everything from input; on EOF, it produces the accumulated list of these values.
to_list [Execution_context.Fields]
to_list [Raw_monitor.Fields]
to_list [Async_stream]
to_list t returns a deferred that will become determined with the list of elements in t, if the end of t is reached.
to_pretty [Raw_monitor]
to_stream [Pipe]
to_stream reader returns a stream that reads everything from the pipe.
to_string [Jobs.Priority]
transfer [Pipe]
transfer' [Pipe]
transfer' input output ~f ?stop repeatedly reads a batch of elements from input, applies f to the batch, writes the result as a batch to output, and then waits on pushback in output before continuing.
transfer_id [Pipe]
try_with [Std]
try_with [Monitor]
try_with f schedules f () to run in a monitor and returns the result as Ok x if f finishes normally, or returns Error e if there is some error.
try_with_raise_rest [Monitor]
try_with_raise_rest f is the same as try_with f, except that subsequent errors raised by f () are reraised to the monitor that called try_with_raise_rest.

U
uncaught_exception [Scheduler]
unfold [Async_stream]
unfold b f returns a stream a1; a2; ...; an whose elements are determined by the equations: b0 = b Some (a1, b1) = f b0 Some (a2, b2) = f b1 ...
ungroup [Async_stream]
ungroup t takes a stream of lists and unpacks the items from each list into a single stream
unit [Deferred]
unit is a deferred that is always determined with value ()
unregister [Unregister]
upon [Deferred_std]
upon [Deferred]
upon t f will run f v at some point after t becomes determined with value v.
upon [Raw_ivar.Scheduler_dependent]
upon [Raw_deferred.Scheduler_dependent]
upon' [Raw_ivar.Scheduler_dependent]
upon' [Raw_deferred.Scheduler_dependent]

V
value [Events.Event]
values_available [Pipe]
values_available reader returns a deferred that becomes determined when there are values in the pipe.

W
whenever [Deferred_std]
whenever [Deferred]
whenever t ignores t completely.
with_execution_context [Scheduler]
with_execution_context [Raw_scheduler]
with_timeout [Std]
with_timeout [Clock]
with_timeout span d does pretty much what one can expect.
with_write [Pipe]
with_write writer ~f waits until there is space available in the pipe, and then calls f write, where write can be used by f to write a single value into the pipe at a time.
within [Std]
within [Scheduler]
within [Monitor.Exported_for_scheduler]
within' [Std]
within' [Scheduler]
within' [Monitor.Exported_for_scheduler]
within_context [Scheduler]
within_context [Monitor.Exported_for_scheduler]
within_v [Scheduler]
within_v [Monitor.Exported_for_scheduler]
write [Pipe]
write' [Pipe]
write' writer q transfers the elements from q into the pipe, leaving q empty.