Home > Article > Backend Development > How to enable multi-threading in php
php solution steps to enable multi-threading:
Extension download:https://github.com/krakjoe/pthreads
Manual: http://php.net/manual/zh/book.pthreads.php
##1. Install the php running environment
2. Download extension
unzip pthreads-master.zip cd pthreads-master /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install
3. Add extension
vi /usr/local/php/lib/php.ini
Add:
extension = "pthreads.so"
4. Restart php
pkill php-fpm /usr/local/php/sbin/php-fpmRecommended tutorial:
The above is the detailed content of How to enable multi-threading in php. For more information, please follow other related articles on the PHP Chinese website!