Reviewers: jochen,
Message:
PTAL
https://codereview.chromium.org/1185643004/diff/20001/src/d8.cc
File src/d8.cc (right):
https://codereview.chromium.org/1185643004/diff/20001/src/d8.cc#newcode1431
src/d8.cc:1431: static const char format[] =
"JSON.stringify((%s).call(this, sab));";
Better way to do this?
https://codereview.chromium.org/1185643004/diff/20001/src/d8.cc#newcode1465
src/d8.cc:1465: void Worker::ExecuteInThread() {
A lot of this function is copy/paste from other places in the file. Is
it worth trying to refactor?
https://codereview.chromium.org/1185643004/diff/20001/test/mjsunit/d8-worker.js
File test/mjsunit/d8-worker.js (right):
https://codereview.chromium.org/1185643004/diff/20001/test/mjsunit/d8-worker.js#newcode44
test/mjsunit/d8-worker.js:44: var result = Worker.join();
This API is a bit strange, but was the easiest to implement.
Description:
Add d8 API for spawning function on a new thread.
// Create a new worker, running function |f|. Optionally pass the
// SharedArrayBuffer |opt_sab|.
Worker.new(f, opt_sab);
// Wait for the worker thread to complete. This function returns the
return
// value of the worker function.
Worker.join();
BUG=none
[email protected]
LOG=n
Please review this at https://codereview.chromium.org/1185643004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+228, -18 lines):
M src/d8.h
M src/d8.cc
A + test/mjsunit/d8-worker.js
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.