Using Core and Lwt together

270 views Asked by At

I am using Core and Lwt together in a library I am working on. Core has good modules I'm familiar with and I'm more comfortable with Lwt threads.

Is this a common thing to do? Is there any strong reason not to do that and instead use, let's say, only Core or only Lwt+Batteries?

2

There are 2 answers

0
Ashish Agarwal On BEST ANSWER

This should be fine. I do it all the time. I wrote the Future library, so I don't have to choose between Lwt and Async. However, be warned there are subtle differences in the semantics of Async and Lwt, so I won't recommend Future for very tricky concurrency code.

0
ivg On

Core works fine with Lwt to my experience. Although, I personally think that Async is more powerful, but Lwt is easier to start with, but on a long run you may found yourself reimplementing stuff from Async. It should mentioned, that lwt has a significant advantage in comparison with async it works on windows and js. But if doesn't matter for you, I would personally suggest to use Async.