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

Unified Diff: webrtc/base/messagequeue.h

Issue 1895933003: Adding the ability to use a simulated clock for unit tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
Index: webrtc/base/messagequeue.h
diff --git a/webrtc/base/messagequeue.h b/webrtc/base/messagequeue.h
index efc479cf2644243d8abff92dcfe414e43055d97b..f36d9d0e698dc762b2cb7e230d47bb570b466b09 100644
--- a/webrtc/base/messagequeue.h
+++ b/webrtc/base/messagequeue.h
@@ -49,6 +49,11 @@ class MessageQueueManager {
// MessageQueueManager instance when necessary.
static bool IsInitialized();
+ // Mainly for testing purposes, for use with a simulated clock.
+ // Posts a no-op event on all message queues so they will wake from the
+ // socket server select() and process messages again.
+ static void WakeAllMessageQueues();
+
private:
static MessageQueueManager* Instance();
@@ -58,6 +63,7 @@ class MessageQueueManager {
void AddInternal(MessageQueue *message_queue);
void RemoveInternal(MessageQueue *message_queue);
void ClearInternal(MessageHandler *handler);
+ void WakeAllMessageQueuesInternal();
static MessageQueueManager* instance_;
// This list contains all live MessageQueues.
« no previous file with comments | « webrtc/base/base.gyp ('k') | webrtc/base/messagequeue.cc » ('j') | webrtc/base/simulatedclock.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698