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

Side by Side Diff: base/serial_executor.h

Issue 9169037: Make new TaskRunner, SequencedTaskRunner, and SingleThreadTaskRunner interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« base/executor_helpers.h ('K') | « base/message_loop_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_SERIAL_EXECUTOR_H_
6 #define BASE_SERIAL_EXECUTOR_H_
7 #pragma once
8
9 #include "base/base_export.h"
10 #include "base/executor.h"
11
12 namespace base {
13
14 // A SerialExecutor is an Executor with more guarantees. In
15 // particular, it guarantees that all submitted tasks, if executed,
16 // will be executed on a single specific thread. Furthermore, it
darin (slow to review) 2012/01/25 07:25:56 It wasn't clear to me that we needed this interfac
17 // guarantees that tasks with the same delay and same nestable state
18 // (i.e., whether the task was posted via Post*Task or
19 // PostNonNestable*Task) get processed in FIFO order, with Post*Task
20 // being equivalent to Post*DelayedTask with zero delay.
21 class BASE_EXPORT SerialExecutor : public Executor {
22 public:
23 // Returns true iff the current thread is the thread which tasks
24 // submitted to this object will run on.
25 //
26 // TODO(akalin): Make this a const function.
27 virtual bool BelongsToCurrentThread() = 0;
28 };
29
30 } // namespace base
31
32 #endif // BASE_SERIAL_EXECUTOR_H_
OLDNEW
« base/executor_helpers.h ('K') | « base/message_loop_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698