diff options
author | Hidehiko Abe <hidehiko@google.com> | 2018-02-21 03:06:26 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-02-21 03:06:26 +0000 |
commit | d3a70e1555860b4c5b7f991eb549cd757300909e (patch) | |
tree | b5545667cc754e2b0745fb59dd891d65d30afaeb /base/threading/sequenced_worker_pool.h | |
parent | 97da0eb3ad812d16ac608f39ed3e2f38e2400fc5 (diff) | |
parent | 5dbf0c2ab3ce8ba3300639cb2a50515fe913be7f (diff) | |
download | libchrome-d3a70e1555860b4c5b7f991eb549cd757300909e.tar.gz |
Re-uprev to r462023. am: f810b5921d am: 81c2b1d888
am: 5dbf0c2ab3
Change-Id: Iffb77836212172c38eeb660f550d7b1724a2910c
Diffstat (limited to 'base/threading/sequenced_worker_pool.h')
-rw-r--r-- | base/threading/sequenced_worker_pool.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/base/threading/sequenced_worker_pool.h b/base/threading/sequenced_worker_pool.h index 8cdeb0b5db..e577e1be11 100644 --- a/base/threading/sequenced_worker_pool.h +++ b/base/threading/sequenced_worker_pool.h @@ -275,7 +275,8 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner { // // Returns true if the task was posted successfully. This may fail during // shutdown regardless of the specified ShutdownBehavior. - bool PostWorkerTask(const tracked_objects::Location& from_here, Closure task); + bool PostWorkerTask(const tracked_objects::Location& from_here, + OnceClosure task); // Same as PostWorkerTask but allows a delay to be specified (although doing // so changes the shutdown behavior). The task will be run after the given @@ -287,13 +288,13 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner { // task will be guaranteed to run to completion before shutdown // (BLOCK_SHUTDOWN semantics). bool PostDelayedWorkerTask(const tracked_objects::Location& from_here, - Closure task, + OnceClosure task, TimeDelta delay); // Same as PostWorkerTask but allows specification of the shutdown behavior. bool PostWorkerTaskWithShutdownBehavior( const tracked_objects::Location& from_here, - Closure task, + OnceClosure task, WorkerShutdown shutdown_behavior); // Like PostWorkerTask above, but provides sequencing semantics. This means @@ -309,13 +310,13 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner { // shutdown regardless of the specified ShutdownBehavior. bool PostSequencedWorkerTask(SequenceToken sequence_token, const tracked_objects::Location& from_here, - Closure task); + OnceClosure task); // Like PostSequencedWorkerTask above, but allows you to specify a named // token, which saves an extra call to GetNamedSequenceToken. bool PostNamedSequencedWorkerTask(const std::string& token_name, const tracked_objects::Location& from_here, - Closure task); + OnceClosure task); // Same as PostSequencedWorkerTask but allows a delay to be specified // (although doing so changes the shutdown behavior). The task will be run @@ -329,7 +330,7 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner { bool PostDelayedSequencedWorkerTask( SequenceToken sequence_token, const tracked_objects::Location& from_here, - Closure task, + OnceClosure task, TimeDelta delay); // Same as PostSequencedWorkerTask but allows specification of the shutdown @@ -337,12 +338,12 @@ class BASE_EXPORT SequencedWorkerPool : public TaskRunner { bool PostSequencedWorkerTaskWithShutdownBehavior( SequenceToken sequence_token, const tracked_objects::Location& from_here, - Closure task, + OnceClosure task, WorkerShutdown shutdown_behavior); // TaskRunner implementation. Forwards to PostDelayedWorkerTask(). bool PostDelayedTask(const tracked_objects::Location& from_here, - Closure task, + OnceClosure task, TimeDelta delay) override; bool RunsTasksOnCurrentThread() const override; |