Lwt: a cooperative thread library

  • Authors:
  • Jérôme Vouillon

  • Affiliations:
  • Université Paris Diderot (Paris 7), CNRS, Paris, France

  • Venue:
  • Proceedings of the 2008 ACM SIGPLAN workshop on ML
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a cooperative thread library for Objective Caml. The library is entirely written in Objective Caml and does not rely on any external C function. Programs involving threads are written in a monadic style. This makes it possible to write threaded code almost as regular ML code, even though it has a different semantics. Cooperative threads are especially well suited for concurrent network applications, where threads perform little computation and spend most of their time waiting for input or output, at which time other threads can run. This library has been successfully used in the Unison file synchronizer and the Ocsigen Web server.