Skip to content

Commit

Permalink
call Lwt.wakeup_paused before polling the thread in Lwt_main.run
Browse files Browse the repository at this point in the history
Ignore-this: 5f06d56e6d89d9b984f3ce41659beaa3

Otherwise, if the thread terminates in wakeup_paused, the scheduler
may wait indefinitly for nothing.

darcs-hash:20100504133633-c41ad-7976869aa57bc45fe37045a1dc9cd46defcf5ec9
  • Loading branch information
jeremiedimino committed May 4, 2010
1 parent d96455b commit d5822af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/unix/lwt_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ let default_iteration () =
let main_loop_iteration = ref default_iteration

let rec run t =
Lwt.wakeup_paused ();
match Lwt.poll t with
| Some x ->
x
Expand Down

0 comments on commit d5822af

Please sign in to comment.