forked from ocsigen/lwt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiref-intro
119 lines (92 loc) · 2.43 KB
/
apiref-intro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{1 Lwt - API Reference}
{2 Core library}
The {e core} library ({e lwt} package) contains the {!Lwt} module, which defines
cooperative threads with all the primitives to manipulate them. It
also provides several general purpose modules, which do not depend on
any external package.
{!modules:
Lwt
Lwt_condition
Lwt_list
Lwt_mutex
Lwt_mvar
Lwt_pool
Lwt_sequence
Lwt_pqueue
Lwt_stream
Lwt_switch
}
{2 Logger}
The {e lwt.log} package provides a logger engine.
{!modules:
Lwt_log_core
}
This package depends on the {e core} library
{2 Unix bindings}
The {e lwt.unix} package provides:
- the {!Lwt_unix} module, which wrap system calls into cooperative ones
- the {!Lwt_io} module, which defines cooperative byte channel, in
replacement of ones of the standard library
- module helpers for logging, spawning processes, ...
{!modules:
Lwt_daemon
Lwt_gc
Lwt_io
Lwt_log
Lwt_main
Lwt_engine
Lwt_process
Lwt_throttle
Lwt_timeout
Lwt_unix
Lwt_bytes
Lwt_sys
}
This package depends on the {e core} library, the {e unix} package and
the {e lwt.log} package.
{2 Reactive programming helpers}
The {e lwt.react} package provides helpers for functionnal reactive
programming with Lwt. It is based on the {e react} package. The
{!Lwt_react} module is a replacement for the [React] module. It
contains:
- all the functions of the [React] module
- Lwt specific primitives
- cooperative versions of {e react} functions
{!modules:
Lwt_react
}
This package depends on the {e core} library and the {e react} package.
{2 Syntax extensions}
Lwt is shipped with two syntax extensions. The first one, contained in
the {e lwt.syntax} package, aims to make coding with Lwt easier, and
to make code more readable. The second, contained in the package {e
lwt.syntax.log}, is a camlp4 filter which decreases the performance
penalty when using logging by inlining level tests.
{!modules:
Pa_lwt
Pa_lwt_log
}
{2 Terminal manipulation}
The package {e lwt.text} provides:
- terminal manipulation through the module {!Lwt_term}
- text channels which behaves as byte channels but are aware of the
text encoding
- a cooperative, fully customizable read-line facility
{!modules:
Lwt_read_line
Lwt_term
Lwt_text
}
This package depends on the {e core} library, and the {e lwt.react},
{e lwt.unix}, {e text} packages.
{2 Miscellaneous}
The following modules are wrapper for integration of non-Lwt
functions/packages into Lwt.
{!modules:
Lwt_glib
Lwt_lib
Lwt_preemptive
Lwt_ssl
}
{2 Index}
{!indexlist}