You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The program below never terminates, despite the exit 0. What happens is that exit 0 attempts to flush the channel while Lwt_io.flush oc is still in progress.
let (>>=) =Lwt.bind
let flags = [Unix.O_WRONLY; Unix.O_CREAT; Unix.O_APPEND; Unix.O_NONBLOCK]
let _ =Lwt_main.run
(Lwt_unix.openfile "/tmp/out.txt" flags 0o666>>=funfd ->
let oc =Lwt_io.of_fd ~mode:Lwt_io.output fd in
ignore (Lwt_io.write oc "BUG">>=fun() -> Lwt_io.flush oc);
exit 0)
The text was updated successfully, but these errors were encountered:
The program below never terminates, despite the
exit 0
. What happens is thatexit 0
attempts to flush the channel whileLwt_io.flush oc
is still in progress.The text was updated successfully, but these errors were encountered: