Lwt is a library for concurrent programming in OCaml. It is developed by the community, and is one of OCaml's most-used libraries.
Lwt is based around the familiar concept of promises. When you make an I/O request with Lwt, the library gives you a promise. It then runs the request in the background, without blocking the rest of your program. When the request completes, Lwt fulfills the promise, running any handlers you've attached. Lwt can process huge numbers of such requests concurrently.
In the meantime, your code (e.g. the handlers) runs in one thread. This eliminates the need to worry about race conditions, set up locking, or other such complications. You can still spawn threads on an opt-in basis, however.
Lwt is routinely used in high-concurrency, high-load applications.
Lwt resources and community
Lwt welcomes users and contributors of all levels of experience!
Please ask any questions you may have. You'd be surprised at how often simple questions help other users, and educate the maintainers. And, if you want to take the plunge and help Lwt and the broader OCaml community, we'd love to help you get gently started as a contributor.
To reach us:
If you'd like to follow development more closely, watch the repo on GitHub
And, if you are looking for something helpful, but not too challenging to get started contributing with, we maintain a list of easy issues.
Happy concurrent programming!