Implement cached thread pool

This commit is contained in:
topjohnwu
2021-08-24 02:39:54 -07:00
parent b591af7803
commit 0cd99712fa
7 changed files with 90 additions and 23 deletions

View File

@@ -144,8 +144,8 @@ static void handle_request(int client) {
goto done;
}
// Create new thread to handle complex requests
new_daemon_thread([=] { handle_request_async(client, code, cred); });
// Handle complex requests in another thread
exec_task([=] { handle_request_async(client, code, cred); });
return;
done: