Skip to content

Commit 0d89faa

Browse files
committed
Use select() syscall to avoid busy waiting
Currently it consumes a lot of CPU, it's a no-brainer i think. Co-authored-by: Diego de Estrada
1 parent 93aa5e8 commit 0d89faa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/Requests/Transport/cURL.php

+4
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ public function request_multiple($requests, $options) {
220220
do {
221221
$active = 0;
222222

223+
if ($active) {
224+
curl_multi_select($multihandle);
225+
}
226+
223227
do {
224228
$status = curl_multi_exec($multihandle, $active);
225229
}

0 commit comments

Comments
 (0)