Reputation: 49
I have a lot of calculations to do on a single thread (request/response). How can I multi-thread this work?
Upvotes: 1
Views: 110
Reputation: 17148
PHP CAN MULTITHREAD
pthreads is not an interface to Posix Threads, but an Object Orientated Threading API for PHP 5.3+
That is not to say that it is a good idea to create threads in direct response to a web request, but as a matter of fact; PHP can multithread.
Upvotes: 1
Reputation: 19247
Upvotes: 0
Reputation: 1708
PHP cant multi-thread, it can fork - but only when not going through apache!
Look at using a Worker system, like PHP-Resque
It makes life so much easier :)
Upvotes: 1