2

PHP on Gentoo supports the threads USE flag. As far as I know, PHP does not support true threading; I am only aware of the ability to fork using pcntl_fork(), but this functionality is provided by the pcntl USE flag. So what exactly is the point of the threads USE flag if PHP does not support threading?

tl;dr - What purpose does the threads USE flag serve for PHP on Gentoo systems?

6

It compiles PHP with thread safety on. PHP doesn't have threads, but this is supposed to allow PHP to run in a threaded environment such as Apache's worker MPM. However, note that PHP thread safety is highly disputed.

For more information on the topic, I will shamefully plug my answer to a related question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.