You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
functioncollector(Collectable$collectable) : bool{
return$collectable->isGarbage();
}
class Work extends \Threaded{
publicfunctionrun(){
sleep(1);
}
}
$worker = new \Worker();
$worker->start();
$worker->stack(newWork());
while($worker->collect('collector'));
$worker->shutdown();
Expected Output
nothing
Actual Output
Fatal error: Uncaught TypeError: Argument 1 passed to Worker::collect() must be an instance of Closure, string given in pthreads-test.php:38
Stack trace:
#0 pthreads-test.php(38): Worker->collect('collector')
#1 {main}
thrown in pthreads-test.php on line 38
The text was updated successfully, but these errors were encountered:
This updates the stub to match pthreads v3 properly, as per the arginfo of the extension. Some issues were discovered in the process (see #835 and #836), so method signatures have been adjusted to match the documentation where there are mismatches.
The formatting in this file is very inconsistent, I went to great pains to avoid reformatting it to avoid polluting the diff.
Environment
Reproducing Code
Expected Output
nothing
Actual Output
The text was updated successfully, but these errors were encountered: