fork
fork copied to clipboard
A lightweight solution for running code concurrently in PHP
Hello, With this PR I will allow to identify list of callables, either by order (int: default behavior), but also by a name (string: new behavior). Hope you will be...
```bash ErrorException unserialize(): Error at offset 219243 of 219250 bytes file: /Application/vendor/spatie/fork/src/Task.php line: 114 ErrorException: unserialize(): Error at offset 219243 of 219250 bytes in /Application/vendor/spatie/fork/src/Task.php:114 Stack trace: #0 [internal function]:...
PHP 8.2.18 (cli) Sorry for not giving more details, but my knowledge about threads is too low. Version 1.2.2 never reach die('done'); ``` use Spatie\Fork\Fork; $results = Fork::new() ->run( function...
In PR #32 there is some code implemented to handle interrupted system calls. The docs from php do not state this method throws an exception. In my tests I get...
### Problem Currently, when a child process fails during execution (e.g., throws an exception or exits abnormally), the parent process receives an empty string as the result. This makes it...