Index of values
( and* ) [Lwt.Syntax] |
Syntax for Lwt.both.
( and* ) [Lwt_result.Syntax] |
Syntax for Lwt_result.both.
( let* ) [Lwt.Syntax] |
Syntax for Lwt.bind.
( let* ) [Lwt_result.Syntax] |
Syntax for Lwt_result.bind.
(<&>) [Lwt.Infix] |
p1 <&> p2 is the same as Lwt.join[p1; p2].
(<&>) [Lwt] | |
(<?>) [Lwt.Infix] |
p1 <?> p2 is the same as Lwt.choose[p1; p2].
(<?>) [Lwt] | |
Error a_api: exception Dune__exe__Api.Error("\">>||@@class=\\\"odocwiki_index\\\"@@@<<a_apitext=\\\"(>>=)\\\"|valueLwt\" is not a valid module name")=) >> [Lwt] | |
(>>=)=) >> [Lwt_result.Infix] | |
(>|=) [Lwt.Infix] |
p >|= f is the same as Lwt.mapf p.
(>|=) [Lwt] | |
(>|=) [Lwt_result.Infix] | |
A | |
abort [Lwt_io] |
abort ch abort current operations and close the channel immediately.
abort [Lwt_unix] |
abort fd exn makes all current and further uses of the file descriptor fail with the given exception.
abort_jobs [Lwt_unix] |
abort_jobs exn make all pending jobs to fail with exn.
accept [Lwt_unix] |
Wrapper for Unix.accept
accept_n [Lwt_unix] |
accept_n fd count accepts up to count connections at one time.
access [Lwt_unix] |
Wrapper for Unix.access
accum_s [Lwt_react.S] | |
accum_s [Lwt_react.E] | |
add [Lwt_pqueue.S] |
add e q evaluates to a new priority queue, which contains all the elements of q, and the additional element e.
add_first [Lwt_main.Hooks] |
Adds a hook to the hook sequence underlying this module, to be run first, before any other hooks already added.
add_hook [Lwt_switch] |
add_hook switch f registers f so it will be called when Lwt_switch.turn_off is invoked.
add_hook_or_exec [Lwt_switch] |
add_hook_or_exec switch f is the same as Lwt_switch.add_hook except that if the switch is already off, f is called immediately.
add_l [Lwt_sequence] |
add_l x s adds x to the left of the sequence s
add_last [Lwt_main.Hooks] |
Adds a hook to the hook sequence underlying this module, to be run last, after any other hooks already added.
add_r [Lwt_sequence] |
add_l x s adds x to the right of the sequence s
add_task_l [Lwt] |
Like Lwt.add_task_r, but the equivalent code calls Lwt_sequence.add_l instead.
add_task_r [Lwt] |
Lwt.add_task_r sequence is equivalent to
all [Lwt] |
and+ [Lwt.Syntax] |
Syntax for Lwt.both.
and+ [Lwt_result.Syntax] |
Syntax for Lwt_result.both.
app_p [Lwt_react.E] | |
app_s [Lwt_react.S] | |
app_s [Lwt_react.E] | |
append [Lwt_stream] |
append s1 s2 returns a stream which returns all elements of s1, then all elements of s2
append_bigarray [Lwt_unix.IO_vectors] |
append_bigarray vs buffer offset length appends a slice of the Bigarray buffer buffer beginning at offset and with length length to the I/O vector sequence vs.
append_bytes [Lwt_unix.IO_vectors] |
append_bytes vs buffer offset length appends a slice of the bytes buffer buffer beginning at offset and with length length to the I/O vector sequence vs.
async [Lwt] |
Lwt.async f applies f (), which returns a promise, and then makes it so that if the promise is rejected, the exception is passed to !Lwt.async_exception_hook.
async_exception_hook [Lwt] |
Reference to a function, to be called on an "unhandled" exception.
async_method [Lwt_unix] |
async_method () returns the async method used in the current thread.
async_method_key [Lwt_unix] |
The key for storing the local async method.
at_exit [Lwt_main] |
Lwt_main.at_exit hook is the same as ignore (Lwt_main.Exit_hooks.add_first hook).
atomic [Lwt_io] |
atomic f transforms a sequence of io operations into one single atomic io operation.
auto_yield [Lwt_unix] |
auto_yield timeout returns a function f, and f () has the following behavior:
B | |
bind [Lwt_unix] |
Binds an address to the given socket.
bind [Lwt_react.S] |
bind ?eq s f is initially f x where x is the current value of s.
bind [Lwt.Infix.Let_syntax] |
See Lwt.bind.
bind [Lwt] |
Lwt.bind p_1 f makes it so that f will run when p_1 is fulfilled.
bind [Lwt_result] | |
bind_1 [Lwt_unix.Versioned] |
Old version of Lwt_unix.bind.
bind_2 [Lwt_unix.Versioned] |
Since Lwt 3.0.0, this is just an alias for Lwt_unix.bind.
bind_lwt [Lwt_result] | |
bind_lwt_err [Lwt_result] | |
bind_result [Lwt_result] | |
bind_s [Lwt_react.S] |
Same as Lwt_react.S.bind except that f returns a promise.
blit [Lwt_bytes] |
blit buf1 ofs1 buf2 ofs2 len copies len bytes from buf1 starting at offset ofs1 to buf2 starting at offset ofs2.
blit_from_bytes [Lwt_bytes] |
Same as Lwt_bytes.blit but the first buffer is a string instead of a byte array.
blit_to_bytes [Lwt_bytes] |
Same as Lwt_bytes.blit but the second buffer is a string instead of a byte array.
block [Lwt_io] |
block ch size f pass to f the internal buffer and an offset.
blocking [Lwt_unix] |
blocking fd indicates whether Lwt is internally using blocking or non-blocking I/O with fd.
both [Lwt.Infix.Let_syntax] |
See Lwt.both.
both [Lwt] |
Lwt.both p_1 p_2 returns a promise that is pending until both promises p_1 and p_2 become resolved.
both [Lwt_result] |
Lwt.both p_1 p_2 returns a promise that is pending until both promises p_1 and p_2 become resolved.
broadcast [Lwt_condition] |
broadcast condvar value notifies all waiting threads.
broadcast_exn [Lwt_condition] |
broadcast_exn condvar exn fails all waiting threads with exception exn.
buffer_size [Lwt_io] |
Returns the size of the internal buffer.
buffered [Lwt_io] |
buffered oc returns the number of bytes in the buffer
byte_count [Lwt_unix.IO_vectors] |
byte_count vs is the total number of bytes in vs.
byte_order [Lwt_sys] |
The byte order used by the computer running the program.
C | |
call_notification [Lwt_unix] |
Call the handler associated to the given notification.
cancel [Lwt] |
Lwt.cancel p attempts to cancel the pending promise p, without needing access to its resolver.
cancel_jobs [Lwt_unix] |
cancel_jobs () is the same as abort_jobs Lwt.Canceled.
catch [Lwt] |
Lwt.catch f h applies f (), which returns a promise, and then makes it so that h (“handler”) will run when that promise is rejected.
catch [Lwt_result] |
catch x behaves like return y if x evaluates to y, and like fail e if x raises e
change [Lwt_timeout] |
Changes the duration of the given timeout.
chars_of_file [Lwt_io] |
chars_of_file name returns a stream of all characters of the file with name name.
chars_to_file [Lwt_io] |
chars_to_file name chars writes all characters of chars to name
chdir [Lwt_unix] |
Wrapper for Unix.chdir
check [Lwt_switch] |
check switch does nothing if switch is None or contains an switch that is currently on, and raises Lwt_switch.Off otherwise.
check_descriptor [Lwt_unix] |
check_descriptor fd raise an exception if fd is not in the state Open.
chmod [Lwt_unix] |
Wrapper for Unix.chmod
choose [Lwt] |
Lwt.choose ps is the same as Lwt.pickps, except that it does not try to cancel pending promises in ps.
choose [Lwt_stream] |
choose l creates an stream from a list of streams.
chown [Lwt_unix] |
Wrapper for Unix.chown
chroot [Lwt_unix] |
Wrapper for Unix.chroot
clear [Lwt_pool] |
clear p will clear all elements in p, calling the dispose function associated with p on each of the cleared elements.
clear_close_on_exec [Lwt_unix] |
Wrapper for Unix.clear_close_on_exec
clone [Lwt_stream] |
clone st clone the given stream.
close [Lwt_io] |
close ch closes the given channel.
close [Lwt_unix] |
Close a file descriptor.
closed [Lwt_stream] |
closed st returns a thread that will sleep until the stream has been closed.
closedir [Lwt_unix] |
Closes a directory handle.
combine [Lwt_stream] |
combine s1 s2 combines two streams.
compare [Lwt_pqueue.OrderedType] | |
concat [Lwt_stream] |
concat st returns the concatenation of all streams of st.
connect [Lwt_unix] |
Wrapper for Unix.connect
copy [Lwt_bytes] |
copy buffer creates a copy of the given byte array.
create [Lwt_bytes] |
Creates a new byte array of the given size.
create [Lwt_unix.IO_vectors] |
Creates an empty I/O vector sequence.
create [Lwt_timeout] |
Lwt_timeout.create n f creates a new timeout object with duration n seconds.
create [Lwt_throttle.S] |
Creates a rate limiter.
create [Lwt_switch] |
create () creates a new switch.
create [Lwt_mvar] |
create v creates a new mailbox variable containing value v.
create [Lwt_sequence] |
create () creates a new empty sequence
create [Lwt_pool] |
create n ?check ?validate ?dispose f creates a new pool with at most n elements.
create [Lwt_condition] |
create () creates a new condition variable.
create [Lwt_mutex] |
create () creates a new mutex, which is initially unlocked
create [Lwt_stream] |
create () returns a new stream and a push function.
create_bounded [Lwt_stream] |
create_bounded size returns a new stream and a bounded push source.
create_empty [Lwt_mvar] |
create () creates a new empty mailbox variable.
create_temp_dir [Lwt_io] |
Creates a temporary directory, and returns a promise that resolves to its path.
create_with_reference [Lwt_stream] |
create_with_reference () returns a new stream and a push function.
D | |
default [Lwt_engine.Ev_backend] | |
default_async_method [Lwt_unix] |
Returns the default async method.
default_buffer_size [Lwt_io] |
Return the default size for buffers.
delay [Lwt_react.E] |
delay promise is an event which does not occur until promise resolves.
detach [Lwt_preemptive] |
detach f x runs the computation f x in a separate preemptive thread.
devpoll [Lwt_engine.Ev_backend] | |
diff_s [Lwt_react.S] | |
diff_s [Lwt_react.E] | |
direct_access [Lwt_io] |
direct_access ch f passes to f a Lwt_io.direct_access structure.
disable_signal_handler [Lwt_unix] |
Stops receiving this signal
drop [Lwt_unix.IO_vectors] |
drop vs n adjusts the I/O vector sequence vs so that it no longer includes its first n bytes.
dup [Lwt_unix] |
Wrapper for Unix.dup
dup2 [Lwt_unix] |
Wrapper for Unix.dup2
E | |
empty [Lwt_pqueue.S] |
The empty priority queue.
enter_iter_hooks [Lwt_main] |
epoll [Lwt_engine.Ev_backend] | |
eprint [Lwt_io] | |
eprintf [Lwt_io] |
%! does nothing here.
eprintf [Lwt_fmt] |
Returns a promise that prints on the standard error.
eprintl [Lwt_io] | |
eprintlf [Lwt_io] |
%! does nothing here.
establish_server [Lwt_io] |
Like establish_server_with_client_address, but does not pass the client address or fd to the callback f.
establish_server_1 [Lwt_io.Versioned] |
Old version of Lwt_io.establish_server.
establish_server_2 [Lwt_io.Versioned] |
Since Lwt 3.0.0, this is just an alias for Lwt_io.establish_server.
establish_server_with_client_address [Lwt_io] |
Like Lwt_io.establish_server_with_client_socket, but passes two buffered channels to the connection handler f.
establish_server_with_client_socket [Lwt_io] |
establish_server_with_client_socket listen_address f creates a server which listens for incoming connections on listen_address.
exec [Lwt_process] |
Executes the given command and returns its exit status.
execute_job [Lwt_unix] |
exists_p [Lwt_list] | |
exists_s [Lwt_list] | |
exit_hooks [Lwt_main] |
extract [Lwt_bytes] |
extract buffer offset length creates a new byte array of length length and copy the length bytes of buffer at offset into it.
F | |
fail [Lwt] |
Lwt.fail exn is like Lwt.return, except the new promise that is already rejected with exn.
fail [Lwt_result] | |
fail_invalid_arg [Lwt] |
Lwt.invalid_arg s is an abbreviation for
fail_with [Lwt] |
Lwt.fail_with s is an abbreviation for
fake_event [Lwt_engine] |
Event which does nothing when stopped.
fake_io [Lwt_engine] |
Simulates activity on the given file descriptor.
fchmod [Lwt_unix] |
Wrapper for Unix.fchmod
fchown [Lwt_unix] |
Wrapper for Unix.fchown
fdatasync [Lwt_unix] |
Synchronise all data (but not metadata) of the file descriptor with the disk.
file_exists [Lwt_unix.LargeFile] |
file_exists name tests if a file named name exists.
file_exists [Lwt_unix] |
file_exists name tests if a file named name exists.
file_length [Lwt_io] |
Retrieves the length of the file at the given path.
files_of_directory [Lwt_unix] |
files_of_directory dir returns the stream of all files of dir.
fill [Lwt_bytes] |
fill buffer offset length value puts value in all length bytes of buffer starting at offset offset.
filter [Lwt_stream] | |
filter_map [Lwt_stream] | |
filter_map_p [Lwt_list] | |
filter_map_s [Lwt_list] | |
filter_map_s [Lwt_stream] |
filter_map f st filter and map st at the same time
filter_p [Lwt_react.E] | |
filter_p [Lwt_list] | |
filter_s [Lwt_react.S] | |
filter_s [Lwt_react.E] | |
filter_s [Lwt_list] | |
filter_s [Lwt_stream] |
filter f st keeps only values, x, such that f x is true
finalise [Lwt_gc] |
finalise f x ensures f x is evaluated after x has been garbage collected.
finalise_or_exit [Lwt_gc] |
finalise_or_exit f x call f x when x is garbage collected or (exclusively) when the program exits.
finalize [Lwt] |
Lwt.finalize f c applies f (), which returns a promise, and then makes it so c (“cleanup”) will run when that promise is resolved.
find [Lwt_stream] | |
find_map [Lwt_stream] | |
find_map_s [Lwt_stream] |
find_map f s find and map at the same time.
find_min [Lwt_pqueue.S] |
find_min q evaluates to the minimum element of q if it is not empty, and raises Not_found otherwise.
find_node_l [Lwt_sequence] |
find_node_l f s returns the first node of s starting from the left that satisfies f or raises Not_found if none exists.
find_node_opt_l [Lwt_sequence] |
find_node_opt_l f s returns Some x, where x is the first node of s starting from the left that satisfies f or None if none exists.
find_node_opt_r [Lwt_sequence] |
find_node_opt_r f s returns Some x, where x is the first node of s starting from the right that satisfies f or None if none exists.
find_node_r [Lwt_sequence] |
find_node_r f s returns the first node of s starting from the right that satisfies f or raises Not_found if none exists.
find_s [Lwt_list] | |
find_s [Lwt_stream] |
find f s find an element in a stream.
flatten [Lwt_stream] |
flatten st = map_list (fun l -> l) st
flush [Lwt_io] |
flush oc performs all pending writes on oc
flush [Lwt_fmt] |
flush fmt flushes the formatter (as with Format.pp_print_flush) and executes all the printing action on the underlying channel.
flush_all [Lwt_io] |
flush_all () flushes all open output channels
fmap_p [Lwt_react.E] | |
fmap_s [Lwt_react.S] | |
fmap_s [Lwt_react.E] | |
fold [Lwt_stream] | |
fold_l [Lwt_sequence] |
fold_l f s is:
fold_l f s x = f en (... (f e2 (f e1 x)))
where e1, e2, ..., en are the elements of s
fold_left_s [Lwt_list] | |
fold_r [Lwt_sequence] |
fold_r f s is:
fold_r f s x = f e1 (f e2 (... (f en x)))
where e1, e2, ..., en are the elements of s
fold_right_s [Lwt_list] | |
fold_s [Lwt_react.S] | |
fold_s [Lwt_react.E] | |
fold_s [Lwt_stream] |
fold f s x fold_like function for streams.
for_all_p [Lwt_list] | |
for_all_s [Lwt_list] | |
fork [Lwt_unix] |
fork () does the same as Unix.fork.
fprint [Lwt_io] | |
fprintf [Lwt_io] |
%! does nothing here.
fprintf [Lwt_fmt] | |
fprintl [Lwt_io] | |
fprintlf [Lwt_io] |
%! does nothing here.
from [Lwt_react.E] |
from f creates an event which occurs each time f () returns a value.
from [Lwt_stream] |
from f creates a stream from the given input function.
from_direct [Lwt_stream] |
from_direct f does the same as Lwt_stream.from but with a function that does not return a thread.
fstat [Lwt_unix.LargeFile] |
Wrapper for Unix.LargeFile.fstat
fstat [Lwt_unix] |
Wrapper for Unix.fstat
fsync [Lwt_unix] |
Synchronise all data and metadata of the file descriptor with the disk.
ftruncate [Lwt_unix.LargeFile] |
Wrapper for Unix.LargeFile.ftruncate
ftruncate [Lwt_unix] |
Wrapper for Unix.ftruncate
G | |
get [Lwt_bytes] |
get buffer offset returns the byte at offset offset in buffer.
get [Lwt_engine] |
get () returns the engine currently in use.
get [Lwt_sequence] |
Returns the contents of a node
get [Lwt] |
Retrieves the value currently associated with the given implicit callback argument key.
get [Lwt_stream] |
get st removes and returns the first element of the stream, if any.
get_affinity [Lwt_unix] |
get_affinity ?pid () returns the list of CPUs the process with pid pid is allowed to run on.
get_available [Lwt_stream] |
get_available st returns all available elements of l without blocking.
get_available_up_to [Lwt_stream] |
get_available_up_to n st returns up to n elements of l without blocking.
get_bounds [Lwt_preemptive] |
get_bounds () returns the minimum and the maximum number of preemptive threads.
get_cpu [Lwt_unix] |
get_cpu () returns the number of the CPU the current thread is running on.
get_credentials [Lwt_unix] |
get_credentials fd returns credentials information from the given socket.
get_exn [Lwt_result] |
get_exn is the opposite of Lwt_result.catch: it unwraps the result type, returning the value in case of success, calls Lwt.fail in case of error.
get_formatter [Lwt_fmt] |
get_formatter fmt returns the underlying Format.formatter.
get_max_number_of_threads_queued [Lwt_preemptive] |
Returns the size of the waiting queue, if no more threads are available
get_while [Lwt_stream] | |
get_while_s [Lwt_stream] |
get_while f st returns the longest prefix of st where all elements satisfy f.
getaddrinfo [Lwt_unix] |
Wrapper for Unix.getaddrinfo
getcwd [Lwt_unix] |
Wrapper for Unix.getcwd
getgrgid [Lwt_unix] |
Wrapper for Unix.getgrgid
getgrnam [Lwt_unix] |
Wrapper for Unix.getgrnam
gethostbyaddr [Lwt_unix] |
Wrapper for Unix.gethostbyaddr
gethostbyname [Lwt_unix] |
Wrapper for Unix.gethostbyname
gethostname [Lwt_unix] |
Wrapper for Unix.gethostname
getlogin [Lwt_unix] |
Wrapper for Unix.getlogin
getnameinfo [Lwt_unix] |
Wrapper for Unix.getnameinfo
getpeername [Lwt_unix] |
Wrapper for Unix.getpeername
getprotobyname [Lwt_unix] |
Wrapper for Unix.getprotobyname
getprotobynumber [Lwt_unix] |
Wrapper for Unix.getprotobynumber
getpwnam [Lwt_unix] |
Wrapper for Unix.getpwnam
getpwuid [Lwt_unix] |
Wrapper for Unix.getpwuid
getservbyname [Lwt_unix] |
Wrapper for Unix.getservbyname
getservbyport [Lwt_unix] |
Wrapper for Unix.getservbyport
getsockname [Lwt_unix] |
Wrapper for Unix.getsockname
getsockopt [Lwt_unix] |
Wrapper for Unix.getsockopt
getsockopt_error [Lwt_unix] |
Wrapper for Unix.getsockopt_error
getsockopt_float [Lwt_unix] |
Wrapper for Unix.getsockopt_float
getsockopt_int [Lwt_unix] |
Wrapper for Unix.getsockopt_int
getsockopt_optint [Lwt_unix] |
Wrapper for Unix.getsockopt_optint
H | |
handle_unix_error [Lwt_unix] |
Same as Unix.handle_unix_error but catches lwt-level exceptions
have [Lwt_sys] |
Test whether the given feature is available on the current system.
hexdump [Lwt_io] |
hexdump oc str = hexdump_stream oc (Lwt_stream.of_string str)
hexdump [Lwt_stream] |
hexdump byte_stream returns a stream which is the same as the output of hexdump -C.
hexdump_stream [Lwt_io] |
hexdump_stream oc byte_stream produces the same output as the command hexdump -C.
I | |
ifprintf [Lwt_fmt] | |
ignore_result [Lwt] |
An obsolete variant of Lwt.async.
ikfprintf [Lwt_fmt] | |
init [Lwt_preemptive] |
init min max log initialises this module.
input [Lwt_io] |
input input mode representation
io_vector [Lwt_bytes] | |
is_busy [Lwt_io] |
is_busy channel returns whether the given channel is currently busy.
is_closed [Lwt_io] |
is_closed channel returns whether the given channel is currently closed.
is_closed [Lwt_stream] |
is_closed st returns whether the given stream has been closed.
is_empty [Lwt_unix.IO_vectors] |
is_empty vs is true if and only if vs has no I/O vectors, or all I/O vectors in vs have zero bytes.
is_empty [Lwt_mvar] |
is_empty mvar indicates if put mvar can be called without blocking.
is_empty [Lwt_sequence] |
Returns true iff the given sequence is empty
is_empty [Lwt_pqueue.S] |
is_empty q evaluates to true iff q is empty.
is_empty [Lwt_mutex] |
is_empty mutex returns true if they are no thread waiting on the mutex, and false otherwise
is_empty [Lwt_stream] |
is_empty st returns whether the given stream is empty.
is_locked [Lwt_mutex] |
locked mutex returns whether mutex is currently locked
is_on [Lwt_switch] |
is_on switch returns true if the switch is currently on, and false otherwise.
is_sleeping [Lwt] |
Lwt.is_sleeping p is equivalent to Lwt.statep = Lwt.Sleep.
isatty [Lwt_unix] |
Wrapper for Unix.isatty
iter [Lwt_engine] |
iter block performs one iteration of the main loop.
iter [Lwt_stream] | |
iter_l [Lwt_sequence] |
iter_l f s applies f on all elements of s starting from the left
iter_n [Lwt_stream] |
iter_n ?max_concurrency f s iterates over all elements of the stream s.
iter_node_l [Lwt_sequence] |
iter_l f s applies f on all nodes of s starting from the left
iter_node_r [Lwt_sequence] |
iter_l f s applies f on all nodes of s starting from the right
iter_p [Lwt_list] | |
iter_p [Lwt_stream] | |
iter_r [Lwt_sequence] |
iter_l f s applies f on all elements of s starting from the right
iter_s [Lwt_list] | |
iter_s [Lwt_stream] |
iter f s iterates over all elements of the stream.
iteri_p [Lwt_list] | |
iteri_s [Lwt_list] | |
J | |
join [Lwt] |
Lwt.join ps returns a promise that is pending until all promises in the list ps become resolved.
junk [Lwt_stream] |
junk st removes the first element of st.
junk_old [Lwt_stream] |
junk_old st removes all elements that are ready to be read without yielding from st.
junk_while [Lwt_stream] | |
junk_while_s [Lwt_stream] |
junk_while f st removes all elements at the beginning of the streams which satisfy f.
K | |
keep [Lwt_react.S] |
keep s keeps a reference to s so it will never be garbage collected.
keep [Lwt_react.E] |
keep e keeps a reference to e so it will never be garbage collected.
kfprintf [Lwt_fmt] | |
kqueue [Lwt_engine.Ev_backend] | |
L | |
l1_s [Lwt_react.S] | |
l2_s [Lwt_react.S] | |
l3_s [Lwt_react.S] | |
l4_s [Lwt_react.S] | |
l5_s [Lwt_react.S] | |
l6_s [Lwt_react.S] | |
last_new [Lwt_stream] |
last_new st returns the last element that can be obtained without sleeping, or wait for one if none is available.
leave_iter_hooks [Lwt_main] |
length [Lwt_bytes] |
Returns the length of the given byte array.
length [Lwt_io] |
Returns the length of the channel in bytes
length [Lwt_sequence] |
Returns the number of elements in the given sequence.
let+ [Lwt.Syntax] |
Syntax for Lwt.map.
let+ [Lwt_result.Syntax] |
Syntax for Lwt_result.map.
lift [Lwt_result] | |
limit [Lwt_react.S] |
limit f s limits the rate of s update with f.
limit [Lwt_react.E] |
limit f e limits the rate of e with f.
lines_of_file [Lwt_io] |
lines_of_file name returns a stream of all lines of the file with name name.
lines_to_file [Lwt_io] |
lines_to_file name lines writes all lines of lines to file with name name.
link [Lwt_unix] |
Wrapper for Unix.link
listen [Lwt_unix] |
Wrapper for Unix.listen
lock [Lwt_mutex] |
lock mutex lockcs the mutex, that is:
lockf [Lwt_unix] |
Wrapper for Unix.lockf
lookup_min [Lwt_pqueue.S] |
lookup_min q evaluates to Some e, where e is the minimum element of q, if q is not empty, and evaluates to None otherwise.
lseek [Lwt_unix.LargeFile] |
Wrapper for Unix.LargeFile.lseek
lseek [Lwt_unix] |
Wrapper for Unix.lseek
lstat [Lwt_unix.LargeFile] |
Wrapper for Unix.LargeFile.lstat
lstat [Lwt_unix] |
Wrapper for Unix.lstat
M | |
madvise [Lwt_bytes] |
madvise buffer pos len advice advises the kernel how the program will use the memory mapped file between pos and pos + len.
make [Lwt_io] |
make ?buffer ?close ~mode perform_io is the main function for creating new channels.
make_error [Lwt] |
Lwt.make_error exn is equivalent to Error exn since OCaml 4.03.
make_formatter [Lwt_fmt] |
make_formatter ~commit ~fmt creates a new lwt formatter based on the Format.formatter fmt.
make_notification [Lwt_unix] |
new_notifier ?once f registers a new notifier.
make_stream [Lwt_fmt] |
make_stream () returns a formatter and a stream of all the writing order given on that stream.
make_value [Lwt] |
Lwt.make_value v is equivalent to Ok v since OCaml 4.03.
map [Lwt.Infix.Let_syntax] |
See Lwt.map.
map [Lwt] |
Lwt.map f p_1 is similar to Lwt.bindp_1 f, but f is not expected to return a promise.
map [Lwt_stream] | |
map [Lwt_result] | |
map_err [Lwt_result] | |
map_exn [Lwt_stream] |
map_exn s returns a stream that captures all exceptions raised by the source of the stream (the function passed to Lwt_stream.from).
map_file [Lwt_bytes] |
map_file ~fd ?pos ~shared ?size () maps the file descriptor fd to an array of bytes.
map_list [Lwt_stream] | |
map_list_s [Lwt_stream] |
map_list f st applies f on each element of st and flattens the lists returned
map_p [Lwt_react.E] | |
map_p [Lwt_list] | |
map_s [Lwt_react.S] | |
map_s [Lwt_react.E] | |
map_s [Lwt_list] | |
map_s [Lwt_stream] |
map f st maps the value returned by st with f
mapi_p [Lwt_list] | |
mapi_s [Lwt_list] | |
mapped [Lwt_bytes] |
mapped buffer returns true iff buffer is a memory mapped file.
mapper [Ppx_lwt] | |
mcast_add_membership [Lwt_unix] |
mcast_add_membership fd ~ifname addr joins the multicast group addr on the network interface ifname.
mcast_drop_membership [Lwt_unix] |
mcast_drop_membership fd ~ifname addr leaves the multicast group addr on the network interface ifname.
mcast_set_loop [Lwt_unix] |
Whether sent multicast messages are received by the sending host
mcast_set_ttl [Lwt_unix] |
Set TTL/hops value
merge_s [Lwt_react.S] | |
merge_s [Lwt_react.E] | |
mincore [Lwt_bytes] |
mincore buffer offset states tests whether the given pages are in the system memory (the RAM).
mkdir [Lwt_unix] |
Wrapper for Unix.mkdir
mkfifo [Lwt_unix] |
Wrapper for Unix.mkfifo
mode [Lwt_io] |
mode ch returns the mode of a channel
N | |
nchoose [Lwt] |
Lwt.nchoose ps is the same as Lwt.npickps, except that it does not try to cancel pending promises in ps.
nchoose_split [Lwt] |
Lwt.nchoose_split ps is the same as Lwt.nchooseps, except that when multiple promises in ps are fulfilled simultaneously (and none are rejected), the result promise is fulfilled with both the list of values of the fulfilled promises, and the list of promises that are still pending.
new_key [Lwt] |
Creates a fresh implicit callback argument key.
next [Lwt_react.E] |
next e returns the next occurrence of e.
next [Lwt_stream] |
next st removes and returns the next element of the stream or fails with Lwt_stream.Empty, if the stream is empty.
nget [Lwt_stream] |
nget n st removes and returns at most the first n elements of st.
njunk [Lwt_stream] |
njunk n st removes at most the first n elements of the stream.
no_cancel [Lwt] |
Lwt.no_cancel p creates a non-cancelable promise p', with the same state as p.
npeek [Lwt_stream] |
npeek n st returns at most the first n elements of st, without removing them.
npick [Lwt] |
Lwt.npick ps is similar to Lwt.pickps, the difference being that when multiple promises in ps are fulfilled simultaneously (and none are rejected), the result promise is fulfilled with the list of values the promises were fulfilled with.
null [Lwt_io] |
Output which drops everything
O | |
of_array [Lwt_stream] |
of_array a creates a stream returning all elements of a.
of_bytes [Lwt_bytes] |
of_bytes buf returns a newly allocated byte array with the same contents as buf.
of_bytes [Lwt_io] |
Create a channel from a byte array.
of_channel [Lwt_fmt] |
of_channel oc creates a formatter that writes to the channel oc.
of_fd [Lwt_io] |
of_fd ?buffer ?close ~mode fd creates a channel from a file descriptor.
of_list [Lwt_stream] |
of_list l creates a stream returning all elements of l.
of_result [Lwt] |
Lwt.of_result r converts an r to a resolved promise.
of_seq [Lwt_stream] |
of_seq s creates a stream returning all elements of s.
of_stream [Lwt_react.E] |
of_stream stream creates an event which occurs each time a value is available on the stream.
of_string [Lwt_bytes] |
of_string buf returns a newly allocated byte array with the same contents as buf.
of_string [Lwt_stream] |
of_string str creates a stream returning all characters of str.
of_unix_fd [Lwt_io] |
of_unix_fd ?buffer ?close ~mode fd is a short-hand for:
of_unix_file_descr [Lwt_unix] |
Wraps a Unix file descriptor fd in an Lwt_unix.file_descr fd'.
ok [Lwt_result] | |
on_any [Lwt] |
Lwt.on_any p f g makes it so that:
on_cancel [Lwt] |
Lwt.on_cancel p f makes it so that f will run when p becomes canceled.
on_failure [Lwt] |
Lwt.on_failure p f makes it so that f will run when p is rejected.
on_readable [Lwt_engine] |
on_readable fd f calls f each time fd becomes readable.
on_signal [Lwt_unix] |
on_signal signum f calls f each time the signal with numnber signum is received by the process.
on_signal_full [Lwt_unix] |
on_signal_full f is the same as on_signal f except that f also receive the signal handler identifier as argument so it can disable it.
on_success [Lwt] |
Lwt.on_success p f makes it so that f will run when p is fulfilled.
on_terminate [Lwt_stream] |
Same as Lwt_stream.on_termination.
on_termination [Lwt] |
Lwt.on_termination p f makes it so that f will run when p is resolved – that is, fulfilled or rejected.
on_termination [Lwt_stream] |
on_termination st f executes f when the end of the stream st is reached.
on_timer [Lwt_engine] |
on_timer delay repeat f calls f one time after delay seconds.
on_writable [Lwt_engine] |
on_readable fd f calls f each time fd becomes writable.
open_connection [Lwt_io] |
open_connection ?fd ?in_buffer ?out_buffer addr opens a connection to the given address and returns two channels for using it.
open_file [Lwt_io] |
Lwt_io.open_file ~mode file opens the given file, either for reading (with ~mode:Input) or for writing (with ~mode:Output).
open_process [Lwt_process] | |
open_process_full [Lwt_process] | |
open_process_in [Lwt_process] | |
open_process_none [Lwt_process] | |
open_process_out [Lwt_process] | |
open_temp_file [Lwt_io] |
open_temp_file () starts creating a new temporary file, and evaluates to a promise for the pair of the file's name, and an output channel for writing to the file.
opendir [Lwt_unix] |
Opens a directory for listing.
openfile [Lwt_unix] |
Wrapper for Unix.openfile.
output [Lwt_io] |
output output mode representation
P | |
page_size [Lwt_bytes] |
Size of pages.
parse [Lwt_stream] |
parse st f parses st with f.
partition_p [Lwt_list] | |
partition_s [Lwt_list] | |
pause [Lwt] |
Lwt.pause () creates a pending promise that is fulfilled after Lwt finishes calling all currently ready callbacks, i.e.
peek [Lwt_stream] |
peek st returns the first element of the stream, if any, without removing it.
pick [Lwt] |
Lwt.pick ps returns a promise that is pending until one promise in the list ps becomes resolved.
pipe [Lwt_io] |
pipe ?in_buffer ?out_buffer () creates a pipe using Lwt_unix.pipe and makes two channels from the two returned file descriptors
pipe [Lwt_unix] |
pipe () creates pipe using Unix.pipe and returns two lwt file descriptors created from unix file_descriptor
pipe_in [Lwt_unix] |
pipe_in () is the same as Lwt_unix.pipe but maps only the unix file descriptor for reading into a lwt one.
pipe_out [Lwt_unix] |
pipe_out () is the inverse of Lwt_unix.pipe_in.
pmap [Lwt_process] | |
pmap_chars [Lwt_process] | |
pmap_line [Lwt_process] | |
pmap_lines [Lwt_process] | |
poll [Lwt_engine.Ev_backend] | |
pool_size [Lwt_unix] |
Maximum number of system threads that can be started.
port [Lwt_engine.Ev_backend] | |
position [Lwt_io] |
position ch Returns the current position in the channel.
pp [Lwt_engine.Ev_backend] | |
pread [Lwt_unix] |
pread fd buf ~file_offset ofs len on file descriptors allowing seek, reads up to len bytes from fd at offset file_offset from the beginning of the file, and writes them to buf, starting at offset ofs.
pread [Lwt_process] | |
pread_chars [Lwt_process] | |
pread_line [Lwt_process] | |
pread_lines [Lwt_process] | |
print [Lwt_io] | |
printf [Lwt_io] |
%! does nothing here.
printf [Lwt_fmt] |
Returns a promise that prints on the standard output.
printl [Lwt_io] | |
printlf [Lwt_io] |
%! does nothing here.
protected [Lwt] |
Lwt.protected p creates a cancelable promise p' with the same state as p.
proxy [Lwt_bytes] |
proxy buffer offset length creates a ``proxy''.
put [Lwt_mvar] |
put mvar value puts a value into a mailbox variable.
pwrite [Lwt_unix] |
pwrite fd buf ~file_offset ofs len on file descriptors allowing seek, writes up to len bytes to fd from buf, starting at buffer offset ofs.
pwrite [Lwt_process] | |
pwrite_chars [Lwt_process] | |
pwrite_line [Lwt_process] | |
pwrite_lines [Lwt_process] | |
pwrite_string [Lwt_unix] |
See Lwt_unix.pwrite.
R | |
read [Lwt_bytes] | |
read [Lwt_io] |
If ~count is specified, read ~count ic reads at most ~count characters from ic.
read [Lwt_unix] |
read fd buf ofs len reads up to len bytes from fd, and writes them to buf, starting at offset ofs.
read_char [Lwt_io] |
read_char ic reads the next character of ic.
read_char_opt [Lwt_io] |
Same as Lwt_io.read_char, but does not raise End_of_file on end of input
read_chars [Lwt_io] |
read_chars ic returns a stream holding all characters of ic
read_float32 [Lwt_io.NumberIO] |
Reads an IEEE single precision floating point value
read_float64 [Lwt_io.NumberIO] |
Reads an IEEE double precision floating point value
read_int [Lwt_io.NumberIO] |
Reads a 32-bits integer as an ocaml int
read_int16 [Lwt_io.NumberIO] | |
read_int32 [Lwt_io.NumberIO] | |
read_int64 [Lwt_io.NumberIO] | |
read_into [Lwt_io] |
read_into ic buffer offset length reads up to length bytes, stores them in buffer at offset offset, and returns the number of bytes read.
read_into_exactly [Lwt_io] |
read_into_exactly ic buffer offset length reads exactly length bytes and stores them in buffer at offset offset.
read_line [Lwt_io] |
read_line ic reads one complete line from ic and returns it without the end of line.
read_line_opt [Lwt_io] |
Same as Lwt_io.read_line but do not raise End_of_file on end of input.
read_lines [Lwt_io] |
read_lines ic returns a stream holding all lines of ic
read_value [Lwt_io] |
read_value channel reads a marshaled value from channel; it corresponds to the standard library's Marshal.from_channel.
readable [Lwt_unix] |
Returns whether the given file descriptor is currently readable.
readable_count [Lwt_engine] |
Returns the number of events waiting for a file descriptor to become readable.
readdir [Lwt_unix] |
Reads the next directory entry from the given directory.
readdir_n [Lwt_unix] |
readdir_n handle count reads at most count entries from the given directory.
readlink [Lwt_unix] |
Wrapper for Unix.readlink
readv [Lwt_unix] |
readv fd vs reads bytes from fd into the buffer slices vs.
recv [Lwt_bytes] |
Not implemented on Windows.
recv [Lwt_unix] |
Wrapper for Unix.recv.
recv_msg [Lwt_bytes] |
Not implemented on Windows.
recv_msg [Lwt_unix] |
recv_msg ~socket ~io_vectors receives data into a list of io-vectors, plus any file-descriptors that may accompany the messages.
recv_msg_2 [Lwt_unix.Versioned] |
Since Lwt 5.0.0, this is an alias for Lwt_unix.recv_msg.
recvfrom [Lwt_bytes] |
Not implemented on Windows.
recvfrom [Lwt_unix] |
Wrapper for Unix.recvfrom.
register_action [Lwt_unix] |
register_action set fd action registers action on fd.
reinstall_signal_handler [Lwt_unix] |
reinstall_signal_handler signum if any signal handler is registered for this signal with Lwt_unix.on_signal, it reinstall the signal handler (with Sys.set_signal).
remove [Lwt_main.Hooks] |
Removes a hook added by Lwt_main.Hooks.add_first or Lwt_main.Hooks.add_last.
remove [Lwt_sequence] |
Removes a node from the sequence it is part of.
remove_all [Lwt_main.Hooks] |
Removes all hooks from the hook sequence underlying this module.
remove_min [Lwt_pqueue.S] |
remove_min q evaluates to a new priority queue, which contains all the elements of q except for its minimum element.
rename [Lwt_unix] |
Wrapper for Unix.rename
resize_buffer [Lwt_io] |
Resize the internal buffer to the given size
return [Lwt_react.S] |
Same as const.
return [Lwt.Infix.Let_syntax] |
See Lwt.return.
return [Lwt] |
Lwt.return v creates a new promise that is already fulfilled with value v.
return [Lwt_result] | |
return_error [Lwt] |
Like Lwt.return_some, this function performs no optimization.
return_false [Lwt] |
Lwt.return_false is like Lwt.return_unit, but for Lwt.returnfalse.
return_nil [Lwt] |
Lwt.return_nil is like Lwt.return_unit, but for Lwt.return[].
return_none [Lwt] |
Lwt.return_none is like Lwt.return_unit, but for Lwt.returnNone.
return_ok [Lwt] |
Like Lwt.return_some, this function performs no optimization.
return_some [Lwt] |
Counterpart to Lwt.return_none.
return_true [Lwt] |
Lwt.return_true is like Lwt.return_unit, but for Lwt.returntrue.
return_unit [Lwt] |
Lwt.return_unit is defined as Lwt.return(), but this definition is evaluated only once, during initialization of module Lwt, at the beginning of your program.
rev_map_p [Lwt_list] | |
rev_map_s [Lwt_list] | |
rewinddir [Lwt_unix] |
Resets the given directory handle, so that directory listing can be restarted.
rmdir [Lwt_unix] |
Wrapper for Unix.rmdir
run [Lwt_main] |
Lwt_main.run p calls the Lwt scheduler, performing I/O until p resolves.
run_in_main [Lwt_preemptive] |
run_in_main f can be called from a detached computation to execute f () in the main preemptive thread, i.e.
run_job [Lwt_unix] |
run_job ?async_method job starts job and wait for its termination.
run_p [Lwt_react.E] | |
run_s [Lwt_react.S] | |
run_s [Lwt_react.E] | |
S | |
sample_s [Lwt_react.S] | |
select [Lwt_engine.Ev_backend] | |
send [Lwt_bytes] |
Not implemented on Windows.
send [Lwt_unix] |
Wrapper for Unix.send.
send_msg [Lwt_bytes] |
Not implemented on Windows.
send_msg [Lwt_unix] |
send_msg ~socket ~io_vectors ~fds sends data from a list of io-vectors, accompanied with a list of file-descriptors.
send_msg_2 [Lwt_unix.Versioned] |
Since Lwt 5.0.0, this is an alias for Lwt_unix.send_msg.
send_notification [Lwt_unix] |
send_notification id sends a notification.
sendto [Lwt_bytes] |
Not implemented on Windows.
sendto [Lwt_unix] |
Wrapper for Unix.sendto.
set [Lwt_bytes] |
get buffer offset value changes the value of the byte at offset offset in buffer to value.
set [Lwt_engine] |
set ?transfer ?destroy engine replaces the current engine by the given one.
set [Lwt_sequence] |
Change the contents of a node
set_affinity [Lwt_unix] |
set_affinity ?pid cpus sets the list of CPUs the given process is allowed to run on.
set_blocking [Lwt_unix] |
set_blocking fd b causes Lwt to internally use blocking or non-blocking I/O with fd, according to the value of b.
set_bounds [Lwt_preemptive] |
set_bounds (min, max) set the minimum and the maximum number of preemptive threads.
set_close_on_exec [Lwt_unix] |
Wrapper for Unix.set_close_on_exec
set_default_async_method [Lwt_unix] |
Sets the default async method.
set_default_buffer_size [Lwt_io] |
Change the default buffer size.
set_exn_handler [Lwt_timeout] |
Lwt_timeout.set_exn_handler f sets the handler to be used for exceptions raised by timeout actions.
set_max_number_of_threads_queued [Lwt_preemptive] |
Sets the size of the waiting queue, if no more preemptive threads are available.
set_notification [Lwt_unix] |
set_notification id f replace the function associated to the notification by f.
set_pool_size [Lwt_unix] |
Change the size of the pool.
set_position [Lwt_io] |
set_position ch pos Sets the position in the output channel.
setsockopt [Lwt_unix] |
Wrapper for Unix.setsockopt
setsockopt_float [Lwt_unix] |
Wrapper for Unix.setsockopt_float
setsockopt_int [Lwt_unix] |
Wrapper for Unix.setsockopt_int
setsockopt_optint [Lwt_unix] |
Wrapper for Unix.setsockopt_optint
shell [Lwt_process] |
A command executed with the shell.
shutdown [Lwt_unix] |
Wrapper for Unix.shutdown
shutdown_server [Lwt_io] |
Closes the given server's listening socket.
shutdown_server_1 [Lwt_io.Versioned] |
Old version of Lwt_io.shutdown_server.
shutdown_server_2 [Lwt_io.Versioned] |
Since Lwt 3.0.0, this is just an alias for Lwt_io.shutdown_server.
signal [Lwt_condition] |
signal condvar value notifies that a condition is ready.
signal_count [Lwt_unix] |
Returns the number of registered signal handler.
simple_init [Lwt_preemptive] |
simple_init () checks if the library is not yet initialized, and if not, does a simple initialization.
size [Lwt_pqueue.S] |
size q evaluates to the number of elements in q.
sleep [Lwt_unix] |
sleep d is a thread that remains suspended for d seconds and then terminates.
socket [Lwt_unix] |
socket domain type proto is the same as Unix.socket but maps the result into a lwt file descriptor
socketpair [Lwt_unix] |
Wrapper for Unix.socketpair
start [Lwt_timeout] |
Starts the given timeout.
stat [Lwt_unix.LargeFile] |
Wrapper for Unix.LargeFile.stat
stat [Lwt_unix] |
Wrapper for Unix.stat
state [Lwt_unix] |
state fd returns the state of fd
state [Lwt] |
Lwt.state p evaluates to the current state of promise p:
stderr [Lwt_io] |
The standard output for error messages, it writes data to Lwt_unix.stderr
stderr [Lwt_unix] |
The standard file descriptor for printing error messages
stderr [Lwt_fmt] |
Formatter printing on Lwt_io.stdout.
stdin [Lwt_io] |
The standard input, it reads data from Lwt_unix.stdin
stdin [Lwt_unix] |
The standard file descriptor for input.
stdout [Lwt_io] |
The standard output, it writes data to Lwt_unix.stdout
stdout [Lwt_unix] |
The standard file descriptor for output
stdout [Lwt_fmt] |
Formatter printing on Lwt_io.stdout.
stop [Lwt_timeout] |
Stops (cancels) the given timeout.
stop_event [Lwt_engine] |
stop_event event stops the given event.
stop_notification [Lwt_unix] |
Stop the given notification.
symlink [Lwt_unix] |
Wrapper for Unix.symlink
system [Lwt_unix] |
Executes the given command, waits until it terminates, and return its termination status.
system_byte_order [Lwt_io] |
Same as Lwt_sys.byte_order.
system_limit [Lwt_unix.IO_vectors] |
Some systems limit the number of I/O vectors that can be passed in a single call to their writev or readv system calls.
T | |
take [Lwt_mvar] |
take mvar will take any currently available value from the mailbox variable.
take_available [Lwt_mvar] |
take_available mvar immediately takes the value from mvar without blocking, returning None if the mailbox is empty.
take_l [Lwt_sequence] |
take_l x s remove and returns the leftmost element of s
take_opt_l [Lwt_sequence] |
take_opt_l x s remove and returns Some x where x is the leftmost element of s or None if s is empty
take_opt_r [Lwt_sequence] |
take_opt_l x s remove and returns Some x where x is the rightmost element of s or None if s is empty
take_r [Lwt_sequence] |
take_l x s remove and returns the rightmost element of s
task [Lwt] |
Lwt.task is the same as Lwt.wait, except the resulting promise p is cancelable.
tcdrain [Lwt_unix] |
Wrapper for Unix.tcdrain
tcflow [Lwt_unix] |
Wrapper for Unix.tcflow
tcflush [Lwt_unix] |
Wrapper for Unix.tcflush
tcgetattr [Lwt_unix] |
Wrapper for Unix.tcgetattr
tcsendbreak [Lwt_unix] |
Wrapper for Unix.tcsendbreak
tcsetattr [Lwt_unix] |
Wrapper for Unix.tcsetattr
thread_count [Lwt_unix] |
The number of system threads running (excluding this one).
thread_waiting_count [Lwt_unix] |
The number threads waiting for a job.
timeout [Lwt_unix] |
timeout d is a thread that remains suspended for d seconds and then fails with Lwt_unix.Timeout.
timer_count [Lwt_engine] |
Returns the number of registered timers.
to_bytes [Lwt_bytes] |
to_bytes buf returns newly allocated bytes with the same contents as buf.
to_list [Lwt_stream] |
Returns the list of elements of the given stream
to_stream [Lwt_react.E] |
Creates a stream holding all values occurring on the given event
to_string [Lwt_bytes] |
to_string buf returns a newly allocated string with the same contents as buf.
to_string [Lwt_stream] |
Returns the word composed of all characters of the given stream
transfer_l [Lwt_sequence] |
transfer_l s1 s2 removes all elements of s1 and add them at the left of s2.
transfer_r [Lwt_sequence] |
transfer_r s1 s2 removes all elements of s1 and add them at the right of s2.
truncate [Lwt_unix.LargeFile] |
Wrapper for Unix.LargeFile.truncate
truncate [Lwt_unix] |
Wrapper for Unix.truncate
try_bind [Lwt] |
Lwt.try_bind f g h applies f (), and then makes it so that:
turn_off [Lwt_switch] |
turn_off switch turns off the switch.
U | |
union [Lwt_pqueue.S] |
union q q' evaluates to a new priority queue, which contains all the elements of both q and q'.
unix_file_descr [Lwt_unix] |
Returns the underlying unix file descriptor.
unlink [Lwt_unix] |
Wrapper for Unix.unlink
unlock [Lwt_mutex] |
unlock mutex unlock the mutex if no threads is waiting on it.
unsafe_blit [Lwt_bytes] |
Same as Lwt_bytes.blit but without bound checking.
unsafe_blit_from_bytes [Lwt_bytes] |
Same as Lwt_bytes.blit_from_bytes but without bounds checking.
unsafe_blit_to_bytes [Lwt_bytes] |
Same as Lwt_bytes.blit_to_bytes but without bounds checking.
unsafe_fill [Lwt_bytes] |
Same as Lwt_bytes.fill but without bounds checking.
unsafe_get [Lwt_bytes] |
Same as Lwt_bytes.get but without bounds checking.
unsafe_set [Lwt_bytes] |
Same as Lwt_bytes.set but without bounds checking.
use [Lwt_pool] |
use p f requests one free element of the pool p and gives it to the function f.
utimes [Lwt_unix] |
utimes path atime mtime updates the access and modification times of the file at path.
W | |
wait [Lwt_unix] |
Wrapper for Unix.wait
wait [Lwt_throttle.S] |
Lwt_throttle.wait limiter channel returns a new promise associated with the given rate limiter and channel.
wait [Lwt_condition] |
wait mutex condvar will cause the current thread to block, awaiting notification for a condition variable, condvar.
wait [Lwt] |
wait4 [Lwt_unix] |
wait4 flags pid returns (pid, status, rusage) where (pid, status) is the same result as Unix.waitpid flags pid, and rusage contains accounting information about the child.
wait_count [Lwt_unix] |
Returns the number of threads waiting for a child to terminate.
wait_for_jobs [Lwt_unix] |
Wait for all pending jobs to terminate.
wait_mincore [Lwt_bytes] |
wait_mincore buffer offset waits until the page containing the byte at offset offset is in RAM.
wait_queue_length [Lwt_pool] |
wait_queue_length p returns the number of Lwt_pool.use requests currently waiting for an element of the pool p to become available.
wait_read [Lwt_unix] |
Waits (without blocking other threads) until there is something to read from the file descriptor.
wait_write [Lwt_unix] |
Waits (without blocking other threads) until it is possible to write on the file descriptor.
waiter_of_wakener [Lwt] |
Lwt.waiter_of_wakener r evaluates to the promise associated with resolver r.
waitpid [Lwt_unix] |
A promise-returning analog to Unix.waitpid.
wakeup [Lwt] |
Lwt.wakeup r v is like Lwt.wakeup_laterr v, except it guarantees that callbacks associated with r will be called immediately, deeper on the current stack.
wakeup_exn [Lwt] |
Lwt.wakeup_exn r exn is like Lwt.wakeup_later_exnr exn, but has the same problems as Lwt.wakeup.
wakeup_later [Lwt] |
wakeup_later_exn [Lwt] |
Lwt.wakeup_later_exn r exn is like Lwt.wakeup_later, except, if the associated promise is pending, it is rejected with exn.
wakeup_later_result [Lwt] |
Lwt.wakeup_later_result r result resolves the pending promise p associated to resolver r, according to result:
wakeup_result [Lwt] |
Lwt.wakeup_result r result is like Lwt.wakeup_later_resultr result, but has the same problems as Lwt.wakeup.
windows [Lwt_sys] |
with_async_detach [Lwt_unix] |
with_async_detach f is a shorthand for:
with_async_none [Lwt_unix] |
with_async_none f is a shorthand for:
with_async_switch [Lwt_unix] |
with_async_switch f is a shorthand for:
with_connection [Lwt_io] |
with_connection ?fd ?in_buffer ?out_buffer addr f opens a connection to the given address and passes the channels to f
with_file [Lwt_io] |
Lwt_io.with_file ~mode filename f opens the given using Lwt_io.open_file, and passes the resulting channel to f.
with_finaliser [Lwt_react.S] |
with_finaliser f s returns a signal s' which behaves as s, except that f is called when s' is garbage collected.
with_finaliser [Lwt_react.E] |
with_finaliser f e returns an event e' which behave as e, except that f is called when e' is garbage collected.
with_lock [Lwt_mutex] |
with_lock lock f is used to lock a mutex within a block scope.
with_process [Lwt_process] | |
with_process_full [Lwt_process] | |
with_process_in [Lwt_process] | |
with_process_none [Lwt_process] | |
with_process_out [Lwt_process] | |
with_switch [Lwt_switch] |
with_switch fn is fn switch, where switch is a fresh switch that is turned off when the callback thread finishes (whether it succeeds or fails).
with_temp_dir [Lwt_io] |
with_temp_dir f first calls Lwt_io.create_temp_dir, forwarding all optional arguments to it.
with_temp_file [Lwt_io] |
with_temp_file f calls Lwt_io.open_temp_file(), passing all optional arguments directly to it.
with_timeout [Lwt_unix] |
with_timeout d f is a short-hand for:
with_value [Lwt] |
Lwt.with_value k v f sets k to v in Lwt's internal implicit callback argument map, then runs f (), then restores the previous value associated with k.
wrap [Lwt] |
Lwt.wrap f applies f ().
wrap1 [Lwt] | |
wrap2 [Lwt] | |
wrap3 [Lwt] | |
wrap4 [Lwt] | |
wrap5 [Lwt] | |
wrap6 [Lwt] | |
wrap7 [Lwt] |
As a “prototype,” Lwt_wrap1 f creates a promise-valued function g:
wrap_exn [Lwt_stream] |
wrap_exn s is a stream s' such that each time s yields a value v, s' yields Result.Ok v, and when the source of s raises an exception e, s' yields Result.Error e.
wrap_syscall [Lwt_unix] |
wrap_syscall set fd action wrap an action on a file descriptor.
writable [Lwt_unix] |
Returns whether the given file descriptor is currently writable.
writable_count [Lwt_engine] |
Returns the number of events waiting for a file descriptor to become writable.
write [Lwt_bytes] | |
write [Lwt_io] |
write oc str writes all characters of str on oc
write [Lwt_unix] |
write fd buf ofs len writes up to len bytes to fd from buf, starting at buffer offset ofs.
write_char [Lwt_io] |
write_char oc char writes char on oc
write_chars [Lwt_io] |
write_chars oc chars writes all characters of chars on oc
write_float32 [Lwt_io.NumberIO] |
Writes an IEEE single precision floating point value
write_float64 [Lwt_io.NumberIO] |
Writes an IEEE double precision floating point value
write_from [Lwt_io] |
write_from oc buffer offset length writes up to length bytes to oc, from buffer at offset offset and returns the number of bytes actually written
write_from_exactly [Lwt_io] |
write_from_exactly oc buffer offset length writes all length bytes from buffer at offset offset to oc
write_from_string [Lwt_io] |
See Lwt_io.write.
write_from_string_exactly [Lwt_io] |
write_int [Lwt_io.NumberIO] |
Writes an ocaml int as a 32-bits integer
write_int16 [Lwt_io.NumberIO] | |
write_int32 [Lwt_io.NumberIO] | |
write_int64 [Lwt_io.NumberIO] | |
write_line [Lwt_io] |
write_line oc str writes str on oc followed by a new-line.
write_lines [Lwt_io] |
write_lines oc lines writes all lines of lines to oc
write_order [Lwt_fmt] |
write_order oc o applies the order o on the channel oc.
write_pending [Lwt_fmt] |
Write all the pending orders of a formatter.
write_string [Lwt_unix] |
See Lwt_unix.write.
write_value [Lwt_io] |
write_value channel ?flags v writes v to channel using the Marshal module of the standard library.
writev [Lwt_unix] |
writev fd vs writes the bytes in the buffer slices vs to the file descriptor fd.
Y | |
yield [Lwt_unix] |
yield () is a thread that suspends itself and then resumes as soon as possible and terminates.
yield [Lwt_main] |
yield () is a threads which suspends itself and then resumes as soon as possible and terminates.
Z | |
zero [Lwt_io] |
Inputs which returns always '\x00'
|