package async_unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Assign_try_with_log_exn : sig ... end

This module is internal to Async. It is included in std.ml so that any code that uses Async_unix.Std does the top-level side effect in this module to assign Async_kernel.Monitor0.try_with_log_exn.

module Async_print : sig ... end

Non-blocking, Async-friendly print functions

module Async_sys : sig ... end

This module overrides everything in the Sys module that might block. Functions do the same thing as their counterparts in Sys, but instead return deferreds. For a description of their semantics see the documentation for the Sys module.

module Busy_pollers : sig ... end

A set of busy-poll functions.

module Clock : sig ... end
module Config : sig ... end
module Dump_core_on_job_delay : sig ... end

Dump core if jobs are delayed, to get additional debug information when running on UNIX systems that support core dumps.

module Epoll_file_descr_watcher : sig ... end
module Fd : sig ... end

An Fd.t is a wrapper around a Unix file descriptor, with additional information about the kind of file descriptor and logic to ensure that we don't use a file descriptor that has been closed, or close a file descriptor that is in use. Since Async uses multiple threads to make read/write and other system calls on file descriptors, and Unix reuses descriptors after they are closed, Async has to be very careful that the file descriptor passed to a system call is referring to the file it intends, and not some other completely unrelated file that Unix has decided to assign to the same descriptor.

module Fd_by_descr : sig ... end

Fd_by_descr is a table of the open Fd.ts, indexed by file descriptor number.

module Fd_tests : sig ... end
module File_descr_watcher_intf : sig ... end
module Import : sig ... end
module In_thread : sig ... end

The In_thread module has functions for interaction between the Async world and other (kernel) threads. The name is to remind us to think about threads and race conditions.

module Interruptor : sig ... end

An interruptor provides a file descriptor that can be used to cause a file-descr-watcher to detect the file descriptor is ready for reading. We use an interruptor when a thread needs the Async scheduler to service a request.

module Io_stats : sig ... end
module Log : sig ... end
module Process : sig ... end
module Raw_fd : sig ... end
module Raw_scheduler : sig ... end
module Raw_signal_manager : sig ... end
module Read_write : sig ... end

Read_write is like Dirpair, except "buy/sell" has been changed to "read/write".

module Reader : sig ... end

Reader is Async's main API for buffered input from a file descriptor. It is the analog of Core.In_channel.

module Reader0 : sig ... end
module Require_explicit_time_source : sig ... end
module Scheduler : sig ... end

Threading model:

module Select_file_descr_watcher : sig ... end
module Shutdown : sig ... end
module Signal : sig ... end
module Signal_manager : sig ... end

A signal manager keeps track of a set of signals to be managed and the signal handlers for them. When a signal manager is managing a signal, it installs its own OCaml handler for that signal that records delivery of the signal. It then later, upon request, will deliver the signal to all its handlers.

module Std : sig ... end
module Syscall : sig ... end

Automatically retrying system calls that may be interrupted with EINTR.

module Thread_pool : sig ... end

A thread pool is a set of OCaml threads used to do work, where each piece of work is simply a thunk. One creates a thread pool, and then uses add_work to submit work to it. Work is done first-come-first-served by available threads in the pool. Any of the available threads in the pool could be used to do work submitted to the pool (except helper threads, see below).

module Thread_safe : sig ... end

The Thread_safe module has functions that are safe to call from threads outside Async.

module Thread_safe_ivar : sig ... end

A simple thread-safe ivar implementation.

module Thread_safe_pipe : sig ... end

A thread-safe pipe is a thread-safe interface to the write end of a normal Async.Pipe. All operations except for create must be called from threads outside Async. create can be called from inside or outside Async.

module Time_source_tests : sig ... end
module Unix_syscalls : sig ... end

Unix_syscalls provides an interface to many of the functions in OCaml's standard Unix module. It uses a deferred in the return type of functions that would block. The idea is that in an Async program one does not use the standard Unix module, since in doing so one could accidentally block the whole program.

module Unix_syscalls_tests : sig ... end
module Writer : sig ... end
module Writer0 : sig ... end
OCaml

Innovation. Community. Security.