decrease cpu usage by sleeping

This commit is contained in:
Fufu Fang 2018-07-25 01:25:53 +01:00
parent 141b951ca8
commit 6fd7baf604
1 changed files with 4 additions and 1 deletions

View File

@ -376,7 +376,9 @@ void LinkTable_fill(LinkTable *linktbl)
}
}
/* Block until the LinkTable is filled up */
while(curl_multi_perform_once());
while (curl_multi_perform_once()) {
usleep(100*1000);
};
}
static void LinkTable_free(LinkTable *linktbl)
@ -533,6 +535,7 @@ static void transfer_blocking(CURL *curl)
while (transfer.transferring) {
curl_multi_perform_once();
usleep(100*1000);
}
}