The v8::V8::GetCurrentThreadId()
and v8::V8::TerminateExecution(int)
methods have been removed from the V8 API. I recommend that you don't use them. The preemption feature is probably also not long for this world.
Instead, simply call v8::V8::TerminateExecution(v8::Isolate*)
. And don't lock the isolate in your breaker thread, as doing so will block until your runner thread releases the isolate, which it won't do until script execution is finished.