Compile and run the program below with
ocamlfind opt -linkpkg -package lwt.unix foo.ml && ./a.out
As written with Lwt.pick
, p2
is canceled first, its callback (registered by Lwt.catch
) runs first, and the output is
p2's callback sees p3 pending