package lwt

  1. Overview
  2. Docs
Promises and event-driven I/O

Install

Dune Dependency

Authors

Maintainers

Sources

5.8.0.tar.gz
md5=2682558f405ab7c8638eeb16d0f9f46f
sha512=7f6548a1b1dbfdbc98d9352151ca7be97fa2ab63dbcc429208ce8d08308eee13f7fce31e0cca53f8880233959a60212d622270dd51bf164c3ee272f179769bd9

doc/src/lwt.unix/lwt_sys.ml.html

Source file lwt_sys.ml

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
(* This file is part of Lwt, released under the MIT license. See LICENSE.md for
   details, or visit https://github.com/ocsigen/lwt/blob/master/LICENSE.md. *)



exception Not_available of string

let () = Callback.register_exception "lwt:not-available" (Not_available "")

let windows = Sys.win32

type feature =
  [ `wait4
  | `get_cpu
  | `get_affinity
  | `set_affinity
  | `recv_msg
  | `send_msg
  | `fd_passing
  | `get_credentials
  | `mincore
  | `madvise
  | `fdatasync
  | `libev ]

let have = function
  | `wait4
  | `recv_msg
  | `send_msg
  | `madvise -> not Sys.win32
  | `mincore -> not (Sys.win32 || Sys.cygwin)
  | `get_cpu -> Lwt_config._HAVE_GETCPU
  | `get_affinity
  | `set_affinity -> Lwt_config._HAVE_AFFINITY
  | `fd_passing -> Lwt_config._HAVE_FD_PASSING
  | `get_credentials -> Lwt_config._HAVE_GET_CREDENTIALS
  | `fdatasync -> Lwt_config._HAVE_FDATASYNC
  | `libev -> Lwt_config._HAVE_LIBEV

type byte_order = Little_endian | Big_endian

external get_byte_order : unit -> byte_order = "lwt_unix_system_byte_order"

let byte_order = get_byte_order ()
OCaml

Innovation. Community. Security.