Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix fast-path in Lwt_fiber: if an await returns immediately then rest…

…ore active_prompt before returning to the fiber
  • Loading branch information...
commit 9a656baf7b937e96b413c296b8f0c55f48362393 1 parent 8dbab94
Anil Madhavapeddy authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  src/lwt-fiber/lwt_fiber.ml
2  src/lwt-fiber/lwt_fiber.ml
@@ -22,11 +22,11 @@ let await t =
22 22 match !active_prompt with
23 23 | None -> failwith "await called outside start"
24 24 | Some p -> p in
25   - active_prompt := None;
26 25
27 26 match Lwt.poll t with
28 27 | Some v -> v
29 28 | None ->
  29 + active_prompt := None;
30 30 Delimcc.shift0 p begin fun k ->
31 31 let ready _ =
32 32 active_prompt := Some p;

0 comments on commit 9a656ba

Please sign in to comment.
Something went wrong with that request. Please try again.