Replies: 1 comment 2 replies
-
Creators of spatie/async say that they don’t like forking. I created a library that uses forking cause I needed that for my telegram bot library. Check it out at https://github.com/skrtdev/php-async. One of the cons of forking is that you can’t have the result of the process |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was playing around with a Laravel project when I needed to run some code in parallel. I didn't want to use
spatie/async
because you're required to manually bootstrap your child processes. That made me think about a potential new feature, one that wraps aroundpcntl_fork
, which don't require manual bootstraps since these child processes are forks of the parent.Forks are slower, but if all you need is to run some code in parallel, they might be a good alternative. Here's an example of my test case, the syntax would be very minimal, with the only goal to run a few callables in parallel:
Beta Was this translation helpful? Give feedback.
All reactions