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}
Showing
Please register or sign in to comment