On Wed, Oct 26, 2011 at 07:34:45AM -0400, Yaron Minsky wrote: > It's an excellent question, and one I don't yet have a good feel for. It > would be great to find some kind of modus vivendi which would allow the > libraries to interoperate.
I think it is not too hard to mix Lwt.t and Defered.t values, one can start with something like that: let lwt_of_async t = let waiter, wakener = Lwt.wait () in Defered.upon t (Lwt.wakeup wakener); waiter let async_of_lwt t = Defered.create (fun ivar -> Lwt.on_success t (Ivar.fill ivar)) But we need to check how this behaves with error handling, and also the local storage of Lwt. For the scheduler the easiest solution is probalby to write a Lwt engine based on Async. -- Jérémie -- 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