ocaml-multicore / domainslib

Parallel Programming over Domains
ISC License
172 stars 30 forks source link

parallel_find : ... -> (unit -> 'a option) -> 'a option #90

Closed gasche closed 1 year ago

gasche commented 2 years ago

This is proposed as a solution for #89.

gasche commented 2 years ago

The CI failures comes from my use of Domain.recommended_domain_count () in my test. The CI uses 5.0~alpha, and I guess this function was not available then? Updating the CI to the recent beta release should fix the issue. (I could also fix the domain number.) In the meantime I think it should be possible to review the code anyway -- the test does pass on my machine.

Sudha247 commented 2 years ago

I propose we merge this and #91 before #92 is worked on, if there are no objections.

ElectreAAS commented 1 year ago

As a user of domainslib (who doesn't know anything about the internals and has no opinion on #91 & #92), I can attest that this is a wanted feature!

Sudha247 commented 1 year ago

Thanks for sharing @ElectreAAS. While we may want to add a full fledged cancellation mechanism (for e.g. like the one in Eio) at a later point, this is a useful feature to have at present. The CI failure looks unrelated, and the branch works fine on my local setup. Merging.