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

Unified Diff: webrtc/base/messagequeue.h

Issue 1714463003: Revert of Prevent data race in MessageQueue. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months 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 | « no previous file | webrtc/base/messagequeue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/messagequeue.h
diff --git a/webrtc/base/messagequeue.h b/webrtc/base/messagequeue.h
index efc479cf2644243d8abff92dcfe414e43055d97b..a7991a8923ad407c216c63542445077df50d2896 100644
--- a/webrtc/base/messagequeue.h
+++ b/webrtc/base/messagequeue.h
@@ -24,11 +24,9 @@
#include "webrtc/base/messagehandler.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
-#include "webrtc/base/sharedexclusivelock.h"
#include "webrtc/base/sigslot.h"
#include "webrtc/base/socketserver.h"
#include "webrtc/base/timeutils.h"
-#include "webrtc/base/thread_annotations.h"
namespace rtc {
@@ -183,7 +181,7 @@
// calling Clear on the object from a different thread.
virtual ~MessageQueue();
- SocketServer* socketserver();
+ SocketServer* socketserver() { return ss_; }
void set_socketserver(SocketServer* ss);
// Note: The behavior of MessageQueue has changed. When a MQ is stopped,
@@ -262,25 +260,21 @@
// destructor.
void DoDestroy();
- void WakeUpSocketServer();
-
+ // The SocketServer is not owned by MessageQueue.
+ SocketServer* ss_;
+ // If a server isn't supplied in the constructor, use this one.
+ scoped_ptr<SocketServer> default_ss_;
bool fStop_;
bool fPeekKeep_;
Message msgPeek_;
- MessageList msgq_ GUARDED_BY(crit_);
- PriorityQueue dmsgq_ GUARDED_BY(crit_);
- uint32_t dmsgq_next_num_ GUARDED_BY(crit_);
+ MessageList msgq_;
+ PriorityQueue dmsgq_;
+ uint32_t dmsgq_next_num_;
CriticalSection crit_;
bool fInitialized_;
bool fDestroyed_;
private:
- // The SocketServer is not owned by MessageQueue.
- SocketServer* ss_ GUARDED_BY(ss_lock_);
- // If a server isn't supplied in the constructor, use this one.
- scoped_ptr<SocketServer> default_ss_;
- SharedExclusiveLock ss_lock_;
-
RTC_DISALLOW_COPY_AND_ASSIGN(MessageQueue);
};
« no previous file with comments | « no previous file | webrtc/base/messagequeue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698