Yes, it's essential to do this for many common functions such as Hashtbl.find. The nice thing about Lwt is that you control yielding, so as long as you catch the exception locally and "convert" it into the Lwt monad, everything works great.
The occasional exception leak is really hard to track down though, if you let one propagate by mistake. Ban OCaml exceptions! :) Anil On 13 Sep 2011, at 19:37, [email protected] wrote: > The Lwt doc states that you should not use "raise" when using Lwt > but use Lwt.fail instead. > > So, is it still OK to call functions (for instance from the stdlib) > that may raise an exception, provided we catch it soon enough ? > And by "soon enough" I mean: before an Lwt call that could schedule > another thread. > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
