Ocsigen

Lwt - API Reference

Version 2.1.0

Index

Core library
Unix bindings
Reactive programming helpers
Syntax extensions
Terminal manipulation
Miscellaneous

This is a preliminary version of the documentation. Help us to improve it by filling tickets. We are looking for native english speakers to proof read the documentation. Contact us!

Lwt - API Reference

Core library

The core library (lwt package) contains the Lwt module, which definescooperative threads with all the primitives to manipulate them. Italso provides several general purpose modules, which do not depend onany external package.


Lwt
Module Lwt: cooperative light-weight threads.
Lwt_condition
Conditions
Lwt_list
List helpers
Lwt_mutex
Cooperative locks for mutual exclusion
Lwt_mvar
Mailbox variables
Lwt_pool
Creating pools (for example pools of connections to a database).
Lwt_sequence
Mutable sequence of elements
Lwt_stream
Data streams

Unix bindings

The lwt.unix package provides:


Lwt_daemon
Daemon helpers
Lwt_gc
Interaction with the garbage collector
Lwt_io
Buffered byte channels
Lwt_log
Logging facility
Lwt_main
Main loop and event queue
Lwt_process
Process management
Lwt_throttle
Rate limiters
Lwt_timeout
Timeouts
Lwt_unix
Cooperative system calls

This package depends on the core library and the unix package.

Reactive programming helpers

The lwt.react package provides helpers for functionnal reactiveprogramming with Lwt. It is based on the react package. BothLwt_event and Lwt_signal modules contains:


Lwt_event
Events utilities
Lwt_signal
Signals utilities

This package depends on the core library and the react package.

Syntax extensions

Lwt is shipped with two syntax extensions. The first one, contained inthe lwt.syntax package, aims to make coding with Lwt easier, andto make code more readable. The second, contained in the package lwt.syntax.log, is a camlp4 filter which decreases the performancepenalty when using logging by inlining level tests.


Pa_lwt
Syntactic sugars for lwt
Pa_log
Logging facility

Terminal manipulation

The package lwt.text provides:


Lwt_read_line
Interactive line input
Lwt_term
Terminal control
Lwt_text
Text channels

This package depends on the core library, and the lwt.react,lwt.unix, text packages.

Miscellaneous

The following modules are wrapper for integration of non-Lwtfunctions/packages into Lwt.


Lwt_glib
Glib integration
Lwt_lib
Cooperative unix system calls
Lwt_preemptive
This module allows to mix preemptive threads with Lwt cooperative threads.
Lwt_ssl
OCaml-SSL integration

Index

Index of types
Index of exceptions
Index of values
Index of class methods
Index of classes
Index of modules
Index of module types