It seems that trying to resolve `Lwt.npick`, when the argument promises are initially pending, results in a promise that fails with `Lwt.Canceled`: ```ocaml open Lwt.Infix let () = let p1, r = Lwt.task () in let p2, _ = Lwt.task () in let p3 = Lwt.npick [p1; p2] in assert (Lwt.state p3 = Lwt.Sleep); Lwt.wakeup r (); (* Expected: *) (* assert (Lwt.state p3 = Lwt.Return [()]) *) (* Actual: *) assert (Lwt.state p3 = Lwt.Fail Lwt.Canceled); (* ocamlfind opt -linkpkg -package lwt npick.ml && ./a.out *) ``` By comparison, if you replace `npick` with `nchoose`, you get the Expected behavior. Since nobody has complained about this, I guess nobody is actually using `npick` with pending promises :)
Activity
aantron commentedon May 30, 2017
Probably best fixed after #354 is in.
Npick fix (ocsigen#447)