package async

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file async.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
open! Async_kernel

(** {2 Async_kernel} *)

include Async_kernel
(** @open *)

module Deferred = struct
  include Deferred

  module Or_error = struct
    include Async_kernel.Deferred.Or_error
    module Expect_test_config = Deferred_or_error_expect_test_config
  end
end

(** {2 Async_unix} *)

include Async_unix (** @open *)

(** {2 Async_command} *)

(* We define [Command] using [struct include ... end] rather than as an alias so that we
   don't have to add [async_command] to downstream jbuild library imports. *)
module Command = struct
  include Async_command
end

(** {2 Async_rpc} *)

include Async_rpc (** @open *)

(* We define [Quickcheck] using [struct include ... end] rather than as an alias so that
   we don't have to add [async_quickcheck] to downstream jbuild library imports. *)
module Quickcheck = struct
  include Async_quickcheck
end

let%test "Async library initialization does not initialize the scheduler" =
  Scheduler.is_ready_to_initialize ()
;;

module Expect_test_config :
  Expect_test_config_types.S
  with type 'a IO_flush.t = 'a Deferred.t
  with type 'a IO_run.t = 'a Deferred.t = struct
  module IO_run = Deferred

  module IO_flush = struct
    include IO_run

    let to_run t = t
  end

  let flush () = return ()
  let run f = Thread_safe.block_on_async_exn f
  let flushed () = true
  let upon_unreleasable_issue = Expect_test_config.upon_unreleasable_issue
end

module Expect_test_config_with_unit_expect = Expect_test_config_with_unit_expect
OCaml

Innovation. Community. Security.