I'm following the example in TestTerminateOnlyV8ThreadFromThreadItself() in
test-thread-termination.cc, and it works for me:
function f() {
var term = true;
try {
while (true) {
if (term) terminate();
term = false;
}
print("not terminated.");
} catch (err) {
print("not terminated.");
err.toString();
}
}
f()
But if I modify the test and remove the while loop, it doesn't work and
print will be called and fail:
function f() {
var term = true;
try {
if (term) terminate();
term = false;
print("not terminated.");
} catch (err) {
print("not terminated.");
err.toString();
}
}
f()
What's the significance of the while loop here?
Thanks.
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" 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.