Using the code from the documentation, I get the warning PHP Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0.
Code
$pool = Pool::create();
foreach (range(1, 5) as $i) {
$pool[] = async(function () use ($i) {
// Something to execute in a child process.
})->then(function (int $output) {
// Handle output returned from the child process.
})->catch(function ( $exception) {
dd($exception);
// Handle exceptions thrown in the child process.
});
}
$r = await($pool);
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
Using the code from the documentation, I get the warning
PHP Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
.Code
Stacktrace
I have also tried this snippet
It gives the error
sh: 1: exec: : Permission denied
.Im using php 8.3 and the posix and pcntl extensions are both enabled.
$pool->isSupported()
returns true.What could be the issue?