douyun8674 2013-08-14 16:44
浏览 287

“尝试使用PHP pthreads时,在...中找不到致命错误类'Thread'

I’m working on a project for my graduation and I need to enable pthreads in PHP because I need multithreading. I used a tutorial, but I get this error: Fatal error class 'Thread' not found in….

I searched the web for help on how to enable pthreads, but nothing helped. I’m using PHP version 5.4.7.

  • 写回答

3条回答 默认 最新

  • dtl19910708 2013-08-14 17:03
    关注

    There is no 'threading' in PHP. You can fork a new 'process' using pctnl_fork(), however there is no built in shared memory between the two processes (youll have to implement shmop() or a socket server setup to communicate between processes). Also, pcntl_* is only usable on linux setups, not windows.

    评论

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀