Skip to content

Commit

Permalink
Use select() syscall to avoid busy waiting
Browse files Browse the repository at this point in the history
Currently it consumes a lot of CPU, it's a no-brainer i think.

Co-authored-by: Diego de Estrada
  • Loading branch information
jrfnl committed Jun 18, 2021
1 parent 93aa5e8 commit 0d89faa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/Requests/Transport/cURL.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ public function request_multiple($requests, $options) {
do {
$active = 0;

if ($active) {
curl_multi_select($multihandle);
}

do {
$status = curl_multi_exec($multihandle, $active);
}
Expand Down

0 comments on commit 0d89faa

Please sign in to comment.