Skip to content

Commit

Permalink
LTerm_read_line: fix synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
kandu committed May 6, 2020
1 parent 40b2092 commit c6dda3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lTerm_read_line.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ object(self)
(* The main loop. *)
method private loop =
Lwt.pick [
Lwt.(>|=) (LTerm.read_event term) (fun ev-> Ev ev);
(Lwt.pause () >>= fun ()-> Lwt.(>|=) (LTerm.read_event term) (fun ev-> Ev ev));
Lwt.(>|=) (Lwt_mvar.take result) (fun r-> Loop_result r);
Lwt.(>|=) (Lwt_mvar.take self#interrupt) (fun e-> Interrupted e);
]
Expand Down

0 comments on commit c6dda3c

Please sign in to comment.