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
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.