Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: net/tools/quic/test_tools/server_thread.cc

Issue 2561913003: Create a QUIC wrapper around a mutex and a mutex lock. (Closed)
Patch Set: fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/test_tools/server_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/server_thread.cc
diff --git a/net/tools/quic/test_tools/server_thread.cc b/net/tools/quic/test_tools/server_thread.cc
index 35421d12ea2aebd9884dbed12a2ad79121017030..a04311e944d1d0f500283d1291bd5bd3255d3034 100644
--- a/net/tools/quic/test_tools/server_thread.cc
+++ b/net/tools/quic/test_tools/server_thread.cc
@@ -71,7 +71,7 @@ int ServerThread::GetPort() {
void ServerThread::Schedule(std::function<void()> action) {
DCHECK(!quit_.IsSignaled());
- base::AutoLock lock(scheduled_actions_lock_);
+ QuicWriterMutexLock lock(&scheduled_actions_lock_);
scheduled_actions_.push_back(std::move(action));
}
@@ -117,7 +117,7 @@ void ServerThread::MaybeNotifyOfHandshakeConfirmation() {
void ServerThread::ExecuteScheduledActions() {
std::deque<std::function<void()>> actions;
{
- base::AutoLock lock(scheduled_actions_lock_);
+ QuicWriterMutexLock lock(&scheduled_actions_lock_);
actions.swap(scheduled_actions_);
}
while (!actions.empty()) {
« no previous file with comments | « net/tools/quic/test_tools/server_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698