The main aim of the introduction is to give a good mental model of what promises are, how they behave and how to use them. It assumes basic familiarity with OCaml.
Don’t hesitate to ask questions or share feedback.
It highlights how the behaviours of bind and wakeup interact. It also waffles on a bit about how pause and run interact. The behaviours of all these functions were already described in the post. In that sense the addendum does not bring any new information. However, it does point out some emergent (and, some would say, surprising) behaviours when the functions are combined.
Anyone interested in the very minutia of scheduling might be interested in reading through the addendum.
Thank you for the article. Is it possible to add a section on how to unittest libraries that use Lwt? I haven’t seen any material on this online. I tried using Ounit2 but it appears that testing assert_raises never actually works and reports that the 'a Lwt.t returning function never raises the expected exception.