amphp / parallel

An advanced parallelization library for PHP, enabling efficient multitasking, optimizing resource use, and application responsiveness through multiple CPU threads.
MIT License
789 stars 63 forks source link

Parallel task(s) keep on running since v2.2 #180

Closed veewee closed 1 year ago

veewee commented 1 year ago

Hello,

Since parallel v2.2 - the parallel tasks in grumphp keep on running on CI: https://github.com/phpro/grumphp/actions/runs/4831876707/jobs/9024673371

I am not able to consistently reproduce this on my local machine - but CI does consistently keep on hanging. The times that I can reproduce, It looks like 1 tasks is not being completed anymore for some reason.

As you can see, the github actions with amp v2.1 (prefer-lowest dependencies) work as expected.

Any clue what could go wrong in this new version of amphp/parallel?

FYI, grumphp's parallel implementation can be found in these 3 filed:

trowski commented 1 year ago

I assume this is due to 37850ff591155c6f5c662173c3fc75682752c918, which was also reported in #179 with tasks hanging. I'm not seeing why this might be happening, and the tests aren't revealing the issue either.

trowski commented 1 year ago

Please update to v2.2.1 and let me know if this fixes your issues.

veewee commented 1 year ago

Yes, that works. Thanks for fixing! :)