Use effect handlers like promises


i have a main thread and i want to run some computations in parallel using fork effect handler and then i want to get all the answers in the main thread and merge them. I guess it’s similar with idea of promises (futures). is there a good way how to do this? is it possible with using xchg effect?

1 Like

A good place to start might be the promises examples in the ocaml-multicore/effects-examples repository effects-examples/ at master · ocaml-multicore/effects-examples · GitHub – this is nice and self-contained.