ocaml-multicore / picos

Interoperable effects based concurrency
https://ocaml-multicore.github.io/picos/doc/picos/index.html
ISC License
86 stars 3 forks source link

Add ability to view completion of a `Computation` as an `Event` #162

Closed polytypic closed 4 months ago

polytypic commented 4 months ago

This PR adds Event.from_computation and uses that to provide Promise.completed. This allows e.g. waiting for one of many promises to complete, i.e. racing promises.