|
|
Chromium Code Reviews
DescriptionUse TaskScheduler instead of WorkerPool in file_select_helper.cc.
This CL replaces base::WorkerPool::PostTask() with
base::PostTaskWithTraits() call. The following traits are used:
Priority: Inherited (default)
The priority is inherited from the calling context (i.e.
TaskTraits takes the priority of the task that creates it).
Shutdown behavior: CONTINUE_ON_SHUTDOWN
Tasks posted with this mode which have not started executing before
shutdown is initiated will never run. Tasks with this mode running at
shutdown will be ignored (the worker will not be joined).
May Block:
Tasks with this trait may block. This includes but is not limited
to tasks that wait on synchronous file I/O operations: read or write
a file from disk, interact with a pipe or a socket, rename or delete
a file, enumerate files in a directory, etc.
No Sync Primitives (default):
Tasks are not allowed to wait on waitable events/condition variables
or to join threads/processes.
TBR=jochen@chromium.org
BUG=659191
Committed: https://crrev.com/9e2697603c48a60c78ca99ad404251d2764ec9c2
Cr-Commit-Position: refs/heads/master@{#440200}
Patch Set 1 #Patch Set 2 : fix build error #Patch Set 3 : may block #Messages
Total messages: 25 (17 generated)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
fdoray@chromium.org changed reviewers: + jochen@chromium.org
Please review this CL. In particular, make sure that the traits mentioned in the CL description make sense for this task. Thanks! Note: WorkerPool is being deprecated in favor of TaskScheduler. Read the design doc https://docs.google.com/document/d/1S2AAeoo1xa_vsLbDYBsDHCqhrkfiMgoIPlyRi6kxa... Note: On shutdown, WorkerPool does not wait for tasks to run. To get the same behavior in TaskScheduler, we used TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN.
I don't know what the file_select_helper does on the worker pool, so I can't really verify that the constraints make sense if you find a reviewer that can, or are sufficiently confident that these are the right constraints, I'm happy to approve for owners
fdoray@chromium.org changed reviewers: + jsbell@chromium.org
jsbell@: Please review this CL. In particular, make sure that the traits mentioned in the CL description make sense for this task. Thanks! Note: WorkerPool is being deprecated in favor of TaskScheduler. Read the design doc https://docs.google.com/document/d/1S2AAeoo1xa_vsLbDYBsDHCqhrkfiMgoIPlyRi6kxa... Note: On shutdown, WorkerPool does not wait for tasks to run. To get the same behavior in TaskScheduler, we used TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN.
Unfortunately, I don't think I meet jochen@'s requirements for someone "sufficiently confident" about the behavior here - I've only touched the file once. brettw@ maybe? From code inspection, the traits appear correct: DirectoryLister::Start() immediately PostTasks DirectoryLister::Core::Start() to the passed runner, which synchronously enumerates the directory, posting back to the origin runner when complete. No specific priority, don't join on shutdown, does sync file I/O, doesn't do any other blocking work. So lgtm but that may not be enough.
Description was changed from ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). With file IO: The task is allowed to perform synchronous IO operations. No Wait (default): The task does not wait on things other than synchronous file IO operations (e.g. WaitableEvent, ConditionVariable, join a thread, join a process, blocking system call that doesn't involve interactions with the file system). BUG=659191 ========== to ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). May Block: Tasks with this trait may block. This includes but is not limited to tasks that wait on synchronous file I/O operations: read or write a file from disk, interact with a pipe or a socket, rename or delete a file, enumerate files in a directory, etc. No Sync Primitives (default): Tasks are not allowed to wait on waitable events/condition variables or to join threads/processes. BUG=659191 ==========
On 2016/12/12 22:36:19, jsbell (OOO thru Jan 2) wrote: > Unfortunately, I don't think I meet jochen@'s requirements for someone > "sufficiently confident" about the behavior here - I've only touched the file > once. brettw@ maybe? > > From code inspection, the traits appear correct: DirectoryLister::Start() > immediately PostTasks DirectoryLister::Core::Start() to the passed runner, which > synchronously enumerates the directory, posting back to the origin runner when > complete. No specific priority, don't join on shutdown, does sync file I/O, > doesn't do any other blocking work. > > So lgtm but that may not be enough. I'm sufficiently confident that these are the right constraints.
Description was changed from ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). May Block: Tasks with this trait may block. This includes but is not limited to tasks that wait on synchronous file I/O operations: read or write a file from disk, interact with a pipe or a socket, rename or delete a file, enumerate files in a directory, etc. No Sync Primitives (default): Tasks are not allowed to wait on waitable events/condition variables or to join threads/processes. BUG=659191 ========== to ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). May Block: Tasks with this trait may block. This includes but is not limited to tasks that wait on synchronous file I/O operations: read or write a file from disk, interact with a pipe or a socket, rename or delete a file, enumerate files in a directory, etc. No Sync Primitives (default): Tasks are not allowed to wait on waitable events/condition variables or to join threads/processes. TBR=jochen@chromium.org BUG=659191 ==========
The CQ bit was checked by fdoray@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jsbell@chromium.org Link to the patchset: https://codereview.chromium.org/2545723005/#ps40001 (title: "may block")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1482348049880380,
"parent_rev": "069da668ed272a1f6c60ed47d3f4262faa040cb9", "commit_rev":
"43525866185fedbaa7afb31aeb4a2c86f6631797"}
Message was sent while issue was closed.
Description was changed from ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). May Block: Tasks with this trait may block. This includes but is not limited to tasks that wait on synchronous file I/O operations: read or write a file from disk, interact with a pipe or a socket, rename or delete a file, enumerate files in a directory, etc. No Sync Primitives (default): Tasks are not allowed to wait on waitable events/condition variables or to join threads/processes. TBR=jochen@chromium.org BUG=659191 ========== to ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). May Block: Tasks with this trait may block. This includes but is not limited to tasks that wait on synchronous file I/O operations: read or write a file from disk, interact with a pipe or a socket, rename or delete a file, enumerate files in a directory, etc. No Sync Primitives (default): Tasks are not allowed to wait on waitable events/condition variables or to join threads/processes. TBR=jochen@chromium.org BUG=659191 Review-Url: https://codereview.chromium.org/2545723005 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). May Block: Tasks with this trait may block. This includes but is not limited to tasks that wait on synchronous file I/O operations: read or write a file from disk, interact with a pipe or a socket, rename or delete a file, enumerate files in a directory, etc. No Sync Primitives (default): Tasks are not allowed to wait on waitable events/condition variables or to join threads/processes. TBR=jochen@chromium.org BUG=659191 Review-Url: https://codereview.chromium.org/2545723005 ========== to ========== Use TaskScheduler instead of WorkerPool in file_select_helper.cc. This CL replaces base::WorkerPool::PostTask() with base::PostTaskWithTraits() call. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits takes the priority of the task that creates it). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). May Block: Tasks with this trait may block. This includes but is not limited to tasks that wait on synchronous file I/O operations: read or write a file from disk, interact with a pipe or a socket, rename or delete a file, enumerate files in a directory, etc. No Sync Primitives (default): Tasks are not allowed to wait on waitable events/condition variables or to join threads/processes. TBR=jochen@chromium.org BUG=659191 Committed: https://crrev.com/9e2697603c48a60c78ca99ad404251d2764ec9c2 Cr-Commit-Position: refs/heads/master@{#440200} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/9e2697603c48a60c78ca99ad404251d2764ec9c2 Cr-Commit-Position: refs/heads/master@{#440200} |
