module Lwt_unix:Modulesig..end
Lwt_unix: thread-compatible system callsval sleep : float -> unit Lwt.tsleep d is a threads which remain suspended for d seconds
(letting other threads run) and then terminates.val yield : unit -> unit Lwt.tyield () is a threads which suspends itself (letting other
thread run) and then resumes as soon as possible and
terminates.val run : 'a Lwt.t -> 'arun t lets the thread t run until it terminates. It
evaluates to the return value of t, or raise the exception
associated to t if t fails.
You should avoid using run inside threads:
run
returns.run are serialized: an
invocation of run will not terminate before all
subsequent invocations are terminated.Unix counterparts, but let other
threads run while waiting for the completion of the system call.type file_descr
val read : file_descr -> string -> int -> int -> int Lwt.tval write : file_descr -> string -> int -> int -> int Lwt.tval wait_read : file_descr -> unit Lwt.tval wait_write : file_descr -> unit Lwt.tval pipe : unit -> file_descr * file_descrval pipe_in : unit -> file_descr * Unix.file_descrval pipe_out : unit -> Unix.file_descr * file_descrval socket : Unix.socket_domain -> Unix.socket_type -> int -> file_descrval socketpair : Unix.socket_domain ->
Unix.socket_type -> int -> file_descr * file_descrval bind : file_descr -> Unix.sockaddr -> unitval listen : file_descr -> int -> unitval accept : file_descr -> (file_descr * Unix.sockaddr) Lwt.tval connect : file_descr -> Unix.sockaddr -> unit Lwt.tval shutdown : file_descr -> Unix.shutdown_command -> unitval close : file_descr -> unitval setsockopt : file_descr -> Unix.socket_bool_option -> bool -> unitval set_close_on_exec : file_descr -> unitval wait : unit -> (int * Unix.process_status) Lwt.tval waitpid : Unix.wait_flag list -> int -> (int * Unix.process_status) Lwt.tval system : string -> Unix.process_status Lwt.tval abort : file_descr -> exn -> unitval unix_file_descr : file_descr -> Unix.file_descrval of_unix_file_descr : Unix.file_descr -> file_descr