rdicosmo / parmap

Parmap is a minimalistic library allowing to exploit multicore architecture for OCaml programs with minimal modifications.
http://rdicosmo.github.io/parmap/
Other
94 stars 20 forks source link

Avoid looping forever if core pinning fails #104

Open IagoAbal opened 3 years ago

IagoAbal commented 3 years ago

This is known to happen, under some circumstances, on Apple M1.

Plus code cleanup.

Closes #103

IagoAbal commented 3 years ago

Be aware that I have not done extensive testing of these changes! For now I have jut ran make test on an Apple M1. I will try to do the same from a Linux machine.

rdicosmo commented 2 years ago

Thanks for looking into this. It is difficult to follow the diff you proposed, though: there is code that is moved untouched in a separate subroutine, and it is not clear what the proposed change really is. May you submit a separate PR with only the change in the logic, without the code reshuffling?