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

Issue 2622633004: Add base::test::ScopedAsyncTaskScheduler. (Closed)

Created:
3 years, 11 months ago by fdoray
Modified:
3 years, 11 months ago
Reviewers:
robliao, gab
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add base::test::ScopedAsyncTaskScheduler. base::test::ScopedAsyncTaskScheduler allows usage of the base/task_scheduler/post_task.h API within its scope. Tasks run asynchronously, one at a time. This is required to allow the migration of v8 from WorkerPool to TaskScheduler. Currently, v8 posts tasks to WorkerPool and waits until they run using a v8::base::Semaphore. Posting these tasks to a synchronous TaskScheduler would result in a deadlock (tasks can't run because the main thread is waiting on a semaphore, the wait cannot end unless tasks run). Posting these tasks to an asynchronous TaskScheduler would work as desired. BUG=553459 Review-Url: https://codereview.chromium.org/2622633004 Cr-Commit-Position: refs/heads/master@{#442364} Committed: https://chromium.googlesource.com/chromium/src/+/83519fc19e33362d2221fb2767e1eff7649eef84

Patch Set 1 #

Patch Set 2 : self-review #

Total comments: 5

Patch Set 3 : Cr gab #5 #

Total comments: 2

Patch Set 4 : CR gab #11 (grammar) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -0 lines) Patch
M base/test/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A base/test/scoped_async_task_scheduler.h View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
A base/test/scoped_async_task_scheduler.cc View 1 chunk +39 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (10 generated)
fdoray
PTAL
3 years, 11 months ago (2017-01-09 19:46:58 UTC) #3
gab
lgtm % comment nit https://codereview.chromium.org/2622633004/diff/20001/base/test/scoped_async_task_scheduler.cc File base/test/scoped_async_task_scheduler.cc (right): https://codereview.chromium.org/2622633004/diff/20001/base/test/scoped_async_task_scheduler.cc#newcode20 base/test/scoped_async_task_scheduler.cc:20: const TimeDelta kSuggestedReclaimTime = TimeDelta::Max(); ...
3 years, 11 months ago (2017-01-09 19:55:47 UTC) #5
fdoray
https://codereview.chromium.org/2622633004/diff/20001/base/test/scoped_async_task_scheduler.cc File base/test/scoped_async_task_scheduler.cc (right): https://codereview.chromium.org/2622633004/diff/20001/base/test/scoped_async_task_scheduler.cc#newcode20 base/test/scoped_async_task_scheduler.cc:20: const TimeDelta kSuggestedReclaimTime = TimeDelta::Max(); On 2017/01/09 19:55:46, gab ...
3 years, 11 months ago (2017-01-09 20:23:48 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2622633004/40001
3 years, 11 months ago (2017-01-09 20:24:27 UTC) #9
gab
lgtm++ https://codereview.chromium.org/2622633004/diff/20001/base/test/scoped_async_task_scheduler.cc File base/test/scoped_async_task_scheduler.cc (right): https://codereview.chromium.org/2622633004/diff/20001/base/test/scoped_async_task_scheduler.cc#newcode20 base/test/scoped_async_task_scheduler.cc:20: const TimeDelta kSuggestedReclaimTime = TimeDelta::Max(); On 2017/01/09 20:23:48, ...
3 years, 11 months ago (2017-01-09 20:27:11 UTC) #11
fdoray
https://codereview.chromium.org/2622633004/diff/40001/base/test/scoped_async_task_scheduler.h File base/test/scoped_async_task_scheduler.h (right): https://codereview.chromium.org/2622633004/diff/40001/base/test/scoped_async_task_scheduler.h#newcode23 base/test/scoped_async_task_scheduler.h:23: // the scope of a ScopedTaskScheduler run synchronously, which ...
3 years, 11 months ago (2017-01-09 20:28:34 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2622633004/60001
3 years, 11 months ago (2017-01-09 20:29:07 UTC) #15
commit-bot: I haz the power
3 years, 11 months ago (2017-01-09 21:48:49 UTC) #18
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/83519fc19e33362d2221fb2767e1...

Powered by Google App Engine
This is Rietveld 408576698