关于 pthreads 版本 3 的 Thread class Pthreads::kill() 的替代项是什么

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

kill() 方法已从 PECL pthreads 库版本 3 中删除。

查看存档手册: 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.

所以你可以看到在新版本中删除了: https://www.php.net/manual/en/class.thread.php

现在可以选择什么来终止或终止 class 中以线程 class 启动的进程?

别无选择。这个方法被删除正是因为使用 pthreads 杀死这样的线程是不安全的。查看 pthreads 存储库中的 this and this 问题以获取更多详细信息和可能的解决方法。

由于 pthreads 已停用,我建议切换到新的 parallel extension. It has a kill 方法。