php pthreads won't launch on xampp 7.0.2

后端 未结 2 1672
醉酒成梦
醉酒成梦 2021-01-29 02:34

I have installed fresh xampp (7.0.2 atm). I\'ve created php-cli.ini, added pthread extension there and set memory limit to 3 gb. But when I\'am trying to launch thread script I

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-29 02:47

    Essentially, this is caused by pthread_create returning EAGAIN: It means that the system lacks resources to create another thread, or that the system imposed limit on the maximum number of threads (in a process, or system wide) has been reached.

    This can be caused by two things, the purposeful use of more threads than a process can handle simultaneously as a result of the way some software is designed, or more perniciously, as a result of less than graceful joining of threads.

    If you only seem to hit such errors sometimes, it would suggest the latter is going on; Be sure to cleanup (explicitly join) threads you are done with to make behaviour predictable.

提交回复
热议问题