Skip to content
Advertisement

Tag: multithreading

What’s alternate for Pthreads::kill() about Thread class of pthreads version 3

The kill() method has been removed from PECL pthreads library version 3. See manual from archive: https://web.archive.org/web/20210410123359/https://www.php.net/manual/en/thread.kill.php Warning: This method has been removed in pthreads v3. Warning: The programmer should not ordinarily kill Threads by force. So as you can see removed in new version: https://www.php.net/manual/en/class.thread.php Now what’s alternate for kill or terminate the proccess from out of class that

Running async function in php

is it possible to create some php class which can run functions asynchronously? Here is what I have done so far: Here is how I want to call it: Answer Recent versions of pthreads support closures as members, making the code very simple: However, this is horrible, it’s hard to imagine any function that is so hungry that it requires

Advertisement