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

Unified Diff: webrtc/base/task_queue.h

Issue 2139723003: Handle initialization race in TaskQueue on Windows, discovered by drmemory (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use QS_ALLEVENTS Created 4 years, 5 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/task_queue_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/task_queue.h
diff --git a/webrtc/base/task_queue.h b/webrtc/base/task_queue.h
index f57c6b4348670f6e98aa88d1d2cdcf22ec5e1c8e..eeabe05fabc886db22bddb0d085bf503d5cf275d 100644
--- a/webrtc/base/task_queue.h
+++ b/webrtc/base/task_queue.h
@@ -13,6 +13,7 @@
#include <list>
#include <memory>
+#include <unordered_map>
#if defined(WEBRTC_MAC) && !defined(WEBRTC_BUILD_LIBEVENT)
#include <dispatch/dispatch.h>
@@ -253,7 +254,10 @@ class LOCKABLE TaskQueue {
dispatch_queue_t queue_;
QueueContext* const context_;
#elif defined(WEBRTC_WIN)
+ typedef std::unordered_map<UINT_PTR, std::unique_ptr<QueuedTask>>
+ DelayedTasks;
static bool ThreadMain(void* context);
+ static bool ProcessQueuedMessages(DelayedTasks* delayed_tasks);
class WorkerThread : public PlatformThread {
public:
« no previous file with comments | « no previous file | webrtc/base/task_queue_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698