I believe that (3) is the only sensible option here, at least if you want to provide transactional guarantees (from the suspender side: either the resource we were waiting for was produced, and we run, or cancellation happened and the resource was not produced / not wasted.) I tried to discuss this in Understanding cancellation (in eio) - #16 by gasche
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Eio 0.1 - effects-based direct-style IO for OCaml 5 | 95 | 9627 | February 23, 2022 | |
Best way to write non blocking in Ocaml 5 | 1 | 616 | September 17, 2023 | |
Understanding cancellation (in eio) | 56 | 4381 | March 24, 2022 | |
Best practices and design patterns for supporting concurrent IO in libraries | 6 | 356 | September 9, 2024 | |
Eio library vs threads library for concurrent programming | 8 | 955 | October 5, 2023 |