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

Unified Diff: base/message_loop.h

Issue 190006: Make swapping the incoming queue with the work queue constant time.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 | base/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.h
===================================================================
--- base/message_loop.h (revision 25087)
+++ base/message_loop.h (working copy)
@@ -281,7 +281,13 @@
bool operator<(const PendingTask& other) const;
};
- typedef std::queue<PendingTask> TaskQueue;
+ class TaskQueue : public std::queue<PendingTask> {
+ public:
+ void Swap(TaskQueue* queue) {
+ c.swap(queue->c);
eric.rannaud 2009/09/02 18:37:46 What is c?
+ }
+ };
+
typedef std::priority_queue<PendingTask> DelayedTaskQueue;
#if defined(OS_WIN)
« no previous file with comments | « no previous file | base/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698