@@ -10,12 +10,12 @@ module type Trigger = sig
1010
1111 Typically the scheduler calls {{!Fiber.try_suspend} [try_suspend]}, which
1212 in turn calls {!on_signal}, to attach a scheduler specific [resume] action
13- to the [trigger]. The scheduler must guarantee that the fiber will be
13+ to the [trigger]. The scheduler must guarantee that the fiber will be
1414 resumed after {!signal} has been called on the [trigger].
1515
1616 Whether being resumed due to cancelation or not, the trigger must be
17- either {{!signal} signaled} outside of the effect handler, or {{!dispose}
18- disposed} by the effect handler, before resuming the fiber.
17+ either {{!signal} signaled} outside of the effect handler, or
18+ {{!dispose} disposed} by the effect handler, before resuming the fiber.
1919
2020 In case the fiber permits propagation of cancelation and the computation
2121 associated with the fiber has been canceled the scheduler is free to
@@ -37,9 +37,9 @@ module type Computation = sig
3737 (* * Schedulers must handle the {!Cancel_after} effect to implement the
3838 behavior of {!cancel_after}.
3939
40- The scheduler should typically {{!try_attach} attach} a {{!Trigger}
41- trigger} to the computation passed with the effect and arrange the
42- timeout to be canceled upon signal to avoid space leaks.
40+ The scheduler should typically {{!try_attach} attach} a
41+ {{!Trigger} trigger} to the computation passed with the effect and arrange
42+ the timeout to be canceled upon signal to avoid space leaks.
4343
4444 The scheduler should measure time using a monotonic clock.
4545
@@ -80,15 +80,15 @@ module type Fiber = sig
8080 ('b , 'r ) Effect.Shallow .handler ->
8181 'r
8282 (* * [resume_with fiber k h] is equivalent to
83- {{!Fiber.canceled} [Effect.Shallow.continue_with k (Fiber.canceled t) h]}. *)
83+ {{!Fiber.canceled} [Effect.Shallow.continue_with k (Fiber.canceled t) h]}.
84+ *)
8485
8586 val continue : t -> ('v , 'r ) Effect.Deep .continuation -> 'v -> 'r
8687 (* * [continue fiber k v] is equivalent to:
8788 {[
8889 match Fiber.canceled fiber with
8990 | None -> Effect.Deep.continue k v
90- | Some (exn, bt) ->
91- Effect.Deep.discontinue_with_backtrace k exn bt
91+ | Some (exn, bt) -> Effect.Deep.discontinue_with_backtrace k exn bt
9292 ]} *)
9393
9494 val continue_with :
@@ -101,20 +101,19 @@ module type Fiber = sig
101101 {[
102102 match Fiber.canceled fiber with
103103 | None -> Effect.Shallow.continue_with k v h
104- | Some (exn, bt) ->
105- Effect.Shallow.discontinue_with_backtrace k exn bt h
104+ | Some (exn, bt) -> Effect.Shallow.discontinue_with_backtrace k exn bt h
106105 ]} *)
107106
108107 (* * Schedulers must handle the {!Current} effect to implement the behavior of
109108 {!current}.
110109
111110 ⚠️ The scheduler must eventually resume the fiber without propagating
112- cancelation. This is necessary to allow a fiber to control the
113- propagation of cancelation through the {{!t} fiber}.
111+ cancelation. This is necessary to allow a fiber to control the propagation
112+ of cancelation through the {{!t} fiber}.
114113
115- The scheduler is free to choose which ready fiber to resume next.
116- However, in typical use cases of {!current} it makes sense to give
117- priority to the fiber performing {!Current}, but this is not required. *)
114+ The scheduler is free to choose which ready fiber to resume next. However,
115+ in typical use cases of {!current} it makes sense to give priority to the
116+ fiber performing {!Current}, but this is not required. *)
118117 type _ Effect.t + = private Current : t Effect .t
119118
120119 (* * Schedulers must handle the {!Yield} effect to implement the behavior of
@@ -125,7 +124,7 @@ module type Fiber = sig
125124 discontinue the fiber immediately.
126125
127126 The scheduler should give priority to running other ready fibers before
128- resuming the fiber performing {!Yield}. A scheduler that always
127+ resuming the fiber performing {!Yield}. A scheduler that always
129128 immediately resumes the fiber performing {!Yield} may prevent an otherwise
130129 valid program from making progress. *)
131130 type _ Effect.t + = private Yield : unit Effect .t
@@ -139,7 +138,7 @@ module type Fiber = sig
139138 ⚠️ In case the fiber performing {!Spawn} permits propagation of cancelation
140139 and the computation associated with the fiber has been canceled before it
141140 performed {!Spawn}, the scheduler should discontinue the current fiber and
142- not spawn a new fiber. If cancelation happens during the handling of
141+ not spawn a new fiber. If cancelation happens during the handling of
143142 {!Spawn} the scheduler is free to either spawn a new fiber, in which case
144143 the current fiber must be continued normally, or not spawn a fiber, in
145144 which case the current fiber must be discontinued, i.e. {!spawn} raises an
@@ -151,9 +150,9 @@ module type Fiber = sig
151150 called.
152151
153152 In other words, spawn should (effectively) check cancelation at least once
154- and be all or nothing. Furthermore, in case a newly spawned fiber is
153+ and be all or nothing. Furthermore, in case a newly spawned fiber is
155154 canceled before its [main] is called, the scheduler must still call the
156- [main]. This allows a program to ensure, i.e. keep track of, that all
155+ [main]. This allows a program to ensure, i.e. keep track of, that all
157156 fibers it spawns are terminated properly and any resources transmitted to
158157 spawned fibers will be disposed properly. *)
159158 type _ Effect.t + =
0 commit comments