Skip to content

Commit

Permalink
impro: lock doesnt need to be active when the thread is signalled
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Apr 2, 2022
1 parent e57eac5 commit f347833
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dpp/queues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ void request_queue::out_loop()
/* Post a http_request into the queue */
void request_queue::post_request(http_request* req)
{
std::unique_lock lock(in_mutex);
requests_in[req->endpoint].push_back(req);
{
std::unique_lock lock(in_mutex);
requests_in[req->endpoint].push_back(req);
}
in_ready.notify_one();
}

Expand Down

0 comments on commit f347833

Please sign in to comment.