Prioritize returning Fiber.any value over cancelling quickly#806
Prioritize returning Fiber.any value over cancelling quickly#806talex5 merged 1 commit intoocaml-multicore:mainfrom
Conversation
|
The tests need updating too (CI is failing). |
|
I changed the test from I'm not sure about the rest of the tests in the CI. One of them is new I think and I don't know how the rest is related to the code I modified. Tried to reproduce those locally but unsuccessfully because of some environment problems with docker. I might need some help with the rest of those CI tests. |
|
Hi again! Can I get some help with the remaining tests in CI, please? I would really benefit from this PR being merged. |
|
Rebasing on |
|
Thanks! Done! |
|
Hi! Can this be merged now, please? |
|
I've rebased it and squashed (so there are no commits in the history with failing tests). I slightly modified the test to check that the parent cancellation takes effect on the next yield. I don't have permission to update your branch (possibly because it's on If you reset your branch to that version I'm happy to merge it - thanks! |
Originally, `Fiber.any` didn't have a `combine` argument, so it was always expected that it was OK to throw away either result, and aborting early made sense. But with `combine` that's no longer true.
|
Done! |
This makes changes in
Fiber.anyto prioritize returning the value rather than cancelling the wholeFiber.anyfrom the outside if we already have the value from one of it's functions. A sample code showing a specific scenario and more detailed explanation are in the issue #805.Let me know if this is reasonable to merge.