ocaml-multicore / eio

Effects-based direct-style IO for multicore OCaml
Other
540 stars 66 forks source link

Add Promise.try_resolve #646

Closed talex5 closed 9 months ago

talex5 commented 9 months ago

It's usually a programming bug to attempt to resolve a promise that's already resolved, but it can be useful to handle it in some cases, especially if you received the resolver from a third-party.