File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1656,10 +1656,10 @@ struct server_queue {
16561656
16571657struct server_response {
16581658 // for keeping track of all tasks waiting for the result
1659- atomic::hash_map<int , int > waiting_task_ids;
1659+ atomic::hash_map<int , int > waiting_task_ids = { 10000 } ;
16601660
16611661 // the main result queue (using ptr for polymorphism)
1662- atomic::hash_map<int , server_task_result_ptr> queue_results;
1662+ atomic::hash_map<int , server_task_result_ptr> queue_results = { 10000 } ;
16631663
16641664 std::mutex mutex_results;
16651665 std::condition_variable condition_results;
@@ -1726,6 +1726,7 @@ struct server_response {
17261726 }
17271727 }
17281728
1729+ std::unique_lock<std::mutex> lock (mutex_results);
17291730 std::cv_status cr_res = condition_results.wait_for (lock, std::chrono::seconds (timeout));
17301731 if (cr_res == std::cv_status::timeout) {
17311732 return nullptr ;
You can’t perform that action at this time.
0 commit comments