Issue metadata
Sign in to add a comment
|
Rename TaskRunner::RunsTasksOnCurrentThread() |
||||||||||||||||||||||||
Issue description
The current name and description of TaskRunner::RunsTasksOnCurrentThread() doesn't match the behavior of SequencedWorkerPoolSequencedTaskRunner::RunsTasksOnCurrentThread().
task_runner.h:
// Returns true if the current thread is a thread on which a task
// may be run, and false if no task will be run on the current
// thread.
//
// It is valid for an implementation to always return true, or in
// general to use 'true' as a default value.
virtual bool RunsTasksOnCurrentThread() const = 0;
sequenced_worker_pool.cc:
bool SequencedWorkerPoolSequencedTaskRunner::RunsTasksOnCurrentThread() const {
return pool_->IsRunningSequenceOnCurrentThread(token_);
}
Note: The above method returns true iff the current task is sequenced with tasks posted to the SequencedWorkerPoolSequencedTaskRunner on which it is called.
We should update the name and description of TaskRunner::RunsTasksOnCurrentThread() to match the behavior of all its impls.
,
Sep 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/04afc10b90ca1b485a3afb9404245c2fe1b7f286 commit 04afc10b90ca1b485a3afb9404245c2fe1b7f286 Author: fdoray <fdoray@chromium.org> Date: Thu Sep 15 13:08:17 2016 TaskScheduler: Match behavior of SequencedWorkerPool in RunsTasksOnCurrentThread(). The RunsTasksOnCurrentThread() method of a SequencedTaskRunner returned by a SequencedWorkerPool returns true iff the current task is part of the sequence associated with the SequencedTaskRunner. This CL changes SchedulerSequencedTaskRunner to match the behavior of SequencedWorkerPool. BUG= 553459 , 646905 Review-Url: https://codereview.chromium.org/2340793002 Cr-Commit-Position: refs/heads/master@{#418850} [modify] https://crrev.com/04afc10b90ca1b485a3afb9404245c2fe1b7f286/base/task_scheduler/scheduler_worker_pool_impl.cc [modify] https://crrev.com/04afc10b90ca1b485a3afb9404245c2fe1b7f286/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
,
Nov 7 2016
,
Dec 19 2016
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by michaeln@google.com
, Sep 14 2016