P2CurlMulti.phpの元ネタらしきコード
usleepを使うのは昔のバグ対策らしいが今は不要
https://blog.ver001.com/curl_multi_select/
最近のPHPはcurl_multi_selectの戻り値を見てはいけない
https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q13154943418
PHP5.3.2以降はCURLM_CALL_MULTI_PERFORMを見る必要はない
774版は5.6以降対応
まとめるとこうなる
private function execute() {
global $_conf;
if(is_null($this->mh) && is_null($this->ch)){
return;
}
// execute
do {
curl_multi_exec($this->mh, $running);
curl_multi_select($this->mh, $_conf['http_conn_timeout'] + $_conf['http_read_timeout']);
} while ($running);
}