Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kayceesrk committed Sep 8, 2017
1 parent cdfd893 commit d911d68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion sources/solved/async_await.ml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ module Scheduler : Scheduler = struct
fun pr main ->
match main () with
| v ->
let l = match !pr with Waiting l -> l | _ -> failwith "impossible" in
let l = match !pr with
| Waiting l -> l
| _ -> failwith "impossible"
in
List.iter (fun k -> enqueue (fun () -> continue k v)) l;
pr := Done v;
dequeue ()
Expand Down
3 changes: 2 additions & 1 deletion sources/solved/echo_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ module Aio : Aio = struct
enqueue (fun () -> continue k (Unix.recv fd buf pos len mode))
| Blocked _ -> failwith "impossible"
end;
Hashtbl.remove ht x
Hashtbl.remove ht x;
resume ht xs
in
resume br rdy_rd_fds;
resume br rdy_wr_fds;
Expand Down
2 changes: 1 addition & 1 deletion sources/state1.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module State (S : sig type t end) : STATE with type t = S.t = struct
let comp =
match f () with
| () -> (fun s -> ())
| effect Get k -> (fun (s : t) -> continue k s s)
| effect Get k -> (fun (s : t) -> (continue k s) s)
in comp init
end

Expand Down

0 comments on commit d911d68

Please sign in to comment.