New issue
Advanced search Search tips

Issue 879306 link

Starred by 3 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Experiments with new worker-based scheduling APIs

Project Member Reported by japhet@chromium.org, Aug 30

Issue description

We've been floating ideas for new scheduling and task management APIs to make workers more useful and ergonomic. This is a tracking bug for CLs in this domain.
 
Cc: wanderview@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1bfac224eb24231c2752eceb6d576beaa64ea120

commit 1bfac224eb24231c2752eceb6d576beaa64ea120
Author: Nate Chapin <japhet@chromium.org>
Date: Thu Aug 30 22:48:45 2018

WorkerTaskQueue, a highly-speculative experimental worker task scheduling API


Bug: 879306
Change-Id: Ia1458ab7275bbcfeeb24e358b5702cb5d5e57c2e
Reviewed-on: https://chromium-review.googlesource.com/1196025
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587820}
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/WebKit/LayoutTests/fast/workers/taskqueue/basic-expected.txt
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/WebKit/LayoutTests/fast/workers/taskqueue/basic.html
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/WebKit/LayoutTests/fast/workers/taskqueue/cancel-expected.txt
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/WebKit/LayoutTests/fast/workers/taskqueue/cancel.html
[modify] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/BUILD.gn
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/experimental/OWNERS
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/experimental/README.md
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/experimental/thread_pool.cc
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/experimental/thread_pool.h
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/experimental/worker_task_queue.cc
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/experimental/worker_task_queue.h
[add] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/experimental/worker_task_queue.idl
[modify] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/worker_thread.cc
[modify] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/core/workers/worker_thread.h
[modify] https://crrev.com/1bfac224eb24231c2752eceb6d576beaa64ea120/third_party/blink/renderer/platform/runtime_enabled_features.json5

I'm also interested in introducing a new worker pool to do parallel style recalculation, do you think the WorkerTaskQueue might be suitable for stuff running in Blink?
Hey Richard,
worker task-queue is an experimental prototype for a potential web exposed API, and shouldn't be used for running stuff within Blink. (You can of course use similar concept for your own work)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/991a06f7b39f6f1f1cee7a7d32e980a97fa0d875

commit 991a06f7b39f6f1f1cee7a7d32e980a97fa0d875
Author: Nate Chapin <japhet@chromium.org>
Date: Wed Sep 12 23:20:34 2018

WorkerTaskQueue.postTask() doesn't handle all task results correctly.

* It fails to serialize if the task returns a Promise. Serialize the
  Promise's result instead.
* Exceptions should now be properly serialized and passed to the reject
  handler.

Bug: 879306
Change-Id: Ib1db460278c448d191b9833f2a50675ae5885a0e
Reviewed-on: https://chromium-review.googlesource.com/1220484
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590853}
[add] https://crrev.com/991a06f7b39f6f1f1cee7a7d32e980a97fa0d875/third_party/WebKit/LayoutTests/fast/workers/taskqueue/reject.html
[modify] https://crrev.com/991a06f7b39f6f1f1cee7a7d32e980a97fa0d875/third_party/blink/renderer/core/workers/experimental/thread_pool.cc
[modify] https://crrev.com/991a06f7b39f6f1f1cee7a7d32e980a97fa0d875/third_party/blink/renderer/core/workers/experimental/thread_pool.h

Cc: yhirano@chromium.org nhiroki@chromium.org
Status: Started (was: Assigned)
+yhirano@ (Networking API team) is interested in this API in terms of integration with 'streams' API.
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0e88c66a9e65a59af94614d1c79e890fdfa634c2

commit 0e88c66a9e65a59af94614d1c79e890fdfa634c2
Author: Nate Chapin <japhet@chromium.org>
Date: Sat Oct 06 00:51:53 2018

WorkerTaskQueue prototype with implicit dependency graph

This adds a new task queue API that returns a handle for the posted
task, and allows future tasks to take this handle as a parameter. This
creates a dependency between the two tasks, and the prerequisite task
will pass its return value as a parameter to the dependent task.

Also, fix a Persistent-rooted reference cycle that was causing
ThreadPools (and their associated threads) to leak.

Bug: 879306
Change-Id: I9af6b85ca2e56da464d4316b29bda53ba694e35a
Reviewed-on: https://chromium-review.googlesource.com/c/1242074
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597386}
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/fast/workers/taskqueue/basic.html
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/fast/workers/taskqueue/cancel.html
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/fast/workers/taskqueue/reject.html
[add] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue_graph.html
[add] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue_graph_cancel.html
[add] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue_graph_fuzz.html
[add] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue_graph_prequisites_done.html
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/BUILD.gn
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/README.md
[add] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/task.cc
[add] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/task.h
[add] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/task.idl
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/thread_pool.cc
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/thread_pool.h
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/worker_task_queue.cc
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/worker_task_queue.h
[modify] https://crrev.com/0e88c66a9e65a59af94614d1c79e890fdfa634c2/third_party/blink/renderer/core/workers/experimental/worker_task_queue.idl

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5815972405d41213aa37c6b76185b3129cbc59eb

commit 5815972405d41213aa37c6b76185b3129cbc59eb
Author: Nate Chapin <japhet@chromium.org>
Date: Wed Oct 10 19:17:53 2018

Rebuild WorkerTaskQueue on top of ThreadPoolTask

There are two prototypes on WorkerTaskQueue: postFunction and postTask.
In spite of having very similar functionality, they are currently
built on separate infrastructure. Use ThreadPoolTask for both, and
add the missing features from the other implementation (i.e., setting
a TaskType, a WeakPtr to enable cancelling tasks via AbortController).

ThreadPool is now a fairly minimal class that just manages
ThreadPoolThread lifetime and selects the least busy thread as needed.

This also expands cancellation/exception handling for
tasks, especially for postTask tasks with dependencies. If a task
is constructed with a prerequisite that cancelled or threw an
exception, that task will be cancelled.

Bug: 879306
Change-Id: I9ea7f46d0c7b62a15fe39519207ed811e50a80f4
Reviewed-on: https://chromium-review.googlesource.com/c/1250049
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598442}
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/WebKit/LayoutTests/fast/workers/taskqueue/cancel-expected.txt
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/WebKit/LayoutTests/fast/workers/taskqueue/cancel.html
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue_graph_cancel.html
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/experimental/README.md
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/experimental/task.cc
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/experimental/task.h
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/experimental/thread_pool.cc
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/experimental/thread_pool.h
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/experimental/worker_task_queue.cc
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/worker_thread.cc
[modify] https://crrev.com/5815972405d41213aa37c6b76185b3129cbc59eb/third_party/blink/renderer/core/workers/worker_thread.h

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cf7ed613af7b01f2e64929f969d3737067e28083

commit cf7ed613af7b01f2e64929f969d3737067e28083
Author: Nate Chapin <japhet@chromium.org>
Date: Fri Oct 19 19:41:00 2018

TaskWorklet prototype

In the vein of WorkerTaskQueue, this provides an API for farming work
out to a pool of background threads. However, it is built on top of
the Worklet API, and also supposes addModule() to load and register
tasks.

Classes with a process() function can be created and registered via
the global scope's registerTask() function. taskWorklet.postTask() can
take a |name| string (rather than a function), look up whether a task
was registered with that name, and call the appropriate process().

Bug: 879306
Change-Id: I7f7c23c3482be3641fde6b78d11f3152c437a460
Reviewed-on: https://chromium-review.googlesource.com/c/1278961
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601260}
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskWorklet_graph.html
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskWorklet_graph_cancel.html
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskWorklet_named_task_without_addModule.html
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/resources/sum.js
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/taskWorklet_addModule.html
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/BUILD.gn
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/README.md
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task.cc
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task.h
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task_worklet.cc
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task_worklet.h
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task_worklet.idl
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task_worklet_global_scope.cc
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task_worklet_global_scope.h
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/task_worklet_global_scope.idl
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/thread_pool.cc
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/thread_pool.h
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/thread_pool_thread.cc
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/thread_pool_thread.h
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/window_task_worklet.h
[add] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/experimental/window_task_worklet.idl
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.h
[modify] https://crrev.com/cf7ed613af7b01f2e64929f969d3737067e28083/third_party/blink/renderer/core/workers/worklet.h

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/268fc36c4626e5251d8f69db17fa1041c8def54e

commit 268fc36c4626e5251d8f69db17fa1041c8def54e
Author: Mostyn Bramley-Moore <mostynb@vewd.com>
Date: Fri Oct 19 21:31:58 2018

[jumbo] avoid blink::kMaxThreadCount collision

CL 1278961 introduced a second blink::kMaxThreadCount which breaks
jumbo builds.  Let's rename it to kMaxTaskWorkletThreads.

Bug: 879306
Change-Id: I5e27227c9ffd01d862ca0ace66029bc932ccd2b9
Reviewed-on: https://chromium-review.googlesource.com/c/1292471
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601303}
[modify] https://crrev.com/268fc36c4626e5251d8f69db17fa1041c8def54e/third_party/blink/renderer/core/workers/experimental/task_worklet.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Nov 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e568dfd57340e379d1a0e26125adde3fb258125b

commit e568dfd57340e379d1a0e26125adde3fb258125b
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Nov 15 10:53:26 2018

Rename test files for TaskWorklet and WorkerTaskQueue

This CL renames test files for TaskWorklet and WorkerTaskQueue from foo_bar.html
to foo-bar.html based on the layout tests guide:

"File names should use snake-case, but preserve the case of any embedded API
names. For example, prefer document-createElement.html to
document-create-element.html."
https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/layout_tests_tips.md#file-names

Bug: 879306
Change-Id: I704665e48c3697205f079a2d2ba28428aa0cffa5
Reviewed-on: https://chromium-review.googlesource.com/c/1334673
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608304}
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskWorklet-graph-cancel.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskWorklet-graph.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskWorklet-named-task-without-addModule.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue-graph-cancel.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue-graph-fuzz.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue-graph-prequisites-done.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/fast/workers/taskqueue/taskqueue-graph.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/resources/async-sum.js
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/taskWorklet-addModule.html
[rename] https://crrev.com/e568dfd57340e379d1a0e26125adde3fb258125b/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/taskWorklet-with-async-process.html

Project Member

Comment 16 by bugdroid1@chromium.org, Nov 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/602c0515b3a9647360ca74dff7e201b471bfd4f4

commit 602c0515b3a9647360ca74dff7e201b471bfd4f4
Author: Nate Chapin <japhet@chromium.org>
Date: Wed Nov 21 19:19:41 2018

TaskWorklet: Tweak passing results from completed prerequisites

1. When selecting a thread for a task, consider which thread all
   prerequisites were assigned, not just the ones still pending.
2. Store the v8::Value for completed tasks.
3. If a task will run on the same thread as a completed
   prerequisite, hop to the worker thread and pass the
   prerequisite's result directly without a deserialization.
   (2) enables this, and (1) increases the frequency in which
   this optimization can be used.
4. Given that it is no longer guaranteed that the serialized
   result will be needed (i.e., if all dependents run on
   the same thread and task.result is never requested on the
   main thread, only the v8::Value will be used), move to a
   lazy serialization model, where the result is only serialized
   when it is promised via task.result or when a dependent is
   assigned to a different thread.

Bug: 879306
Change-Id: I22fe5f201f22b376861a5fb6d6e881ce0d5785cc
Reviewed-on: https://chromium-review.googlesource.com/c/1311498
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610136}
[modify] https://crrev.com/602c0515b3a9647360ca74dff7e201b471bfd4f4/third_party/blink/renderer/core/workers/experimental/task.cc
[modify] https://crrev.com/602c0515b3a9647360ca74dff7e201b471bfd4f4/third_party/blink/renderer/core/workers/experimental/task.h
[modify] https://crrev.com/602c0515b3a9647360ca74dff7e201b471bfd4f4/third_party/blink/renderer/core/workers/experimental/task.idl
[modify] https://crrev.com/602c0515b3a9647360ca74dff7e201b471bfd4f4/third_party/blink/renderer/core/workers/experimental/worker_task_queue.cc

Sign in to add a comment