@@ -6,7 +6,6 @@ let[@inline never] quota_non_positive () = invalid_arg "quota must be positive"
6
6
more memory than values of this type. *)
7
7
type ready =
8
8
| Spawn of Fiber .t * (Fiber .t -> unit )
9
- | Current of Fiber .t * (Fiber .t , unit ) Effect.Deep .continuation
10
9
| Continue of Fiber .t * (unit , unit ) Effect.Deep .continuation
11
10
| Resume of Fiber .t * (Exn_bt .t option , unit ) Effect.Deep .continuation
12
11
| Return of Fiber .t * (unit , unit ) Effect.Deep .continuation
@@ -38,10 +37,6 @@ let rec next t =
38
37
t.fiber < - Fiber.Maybe. of_fiber fiber;
39
38
t.remaining_quota < - t.quota;
40
39
Effect.Deep. match_with main fiber t.handler
41
- | Current (fiber , k ) ->
42
- t.fiber < - Fiber.Maybe. of_fiber fiber;
43
- t.remaining_quota < - t.quota;
44
- Effect.Deep. continue k fiber
45
40
| Return (fiber , k ) ->
46
41
t.fiber < - Fiber.Maybe. of_fiber fiber;
47
42
t.remaining_quota < - t.quota;
@@ -112,16 +107,8 @@ let run_fiber ?quota ?fatal_exn_handler:(exnc : _ = raise) fiber main =
112
107
later. *)
113
108
Some
114
109
(fun k ->
115
- let remaining_quota = t.remaining_quota - 1 in
116
110
let fiber = Fiber.Maybe. to_fiber t.fiber in
117
- if 0 < remaining_quota then begin
118
- t.remaining_quota < - remaining_quota;
119
- Effect.Deep. continue k fiber
120
- end
121
- else begin
122
- Picos_mpscq. push t.ready (Current (fiber, k));
123
- next t
124
- end )
111
+ Effect.Deep. continue k fiber)
125
112
and yield =
126
113
Some
127
114
(fun k ->
0 commit comments