I want to develop PHP multi-threaded extensions myself and I want to develop php multi-threaded Extensions. However, I found that the same method of calling the php user class through multiple threads, but when two methods call the same method of a class instance at the same time, a memory error will be reported. Group: 95303036, technical group welcome to discuss ------ solution ------------------ does PHP support multithreading ??? It seems not supported! ------ Solution ------------------ 1. linux PHP multi-thread extension development
I want to develop php multi-thread extension,
However, it is found that the method for calling php user classes through multiple threads will report a memory error when two methods call the same method of a class instance at the same time.
Group: 95303036, technical group Welcome to discussion
------ Solution --------------------
Does PHP support multithreading ???
It seems not supported!
------ Solution --------------------
1. php multi-thread extension already exists in linux. you can refer to his source code
2. to use multithreading in php, the core php System and the extensions involved must be thread-safe.
------ Solution --------------------
I am referring to the pcntl extension
------ Solution --------------------
Pcntl is a process.
Pecl is the thread, but it has not been updated for a long time.
I don't know what motivation you want to develop. I don't feel necessary,
For more information, see here:
Https://bugs.php.net/bug.php? Id = 47894
------ Solution --------------------
ImageMagick can refer to http://fkblog.sinaapp.com/imagemagick-cn
------ Solution --------------------
Ke, too advanced... contact laruence
Http://www.laruence.com/
Discussion
Upstairs does not ask
Reference:
Pcntl is a process.
Pecl is the thread, but it has not been updated for a long time.
I don't know what motivation you want to develop. I don't feel necessary,
For more information, see here:
Https://bugs.php.net/bug.php? Id = 47894
The reason is that we use php for webgame, because the company wants to do webgame for socket communication, but p ......