2
为什么这个代码带给段错误?:V8代码带来的段错误
int jack_process(jack_nframes_t nframes, void *arg)
{
Local<Value> test = Local<Value>::New(Number::New(2));
return 0;
}
jack_process
在另一并行线程运行。我该如何做到这一点?我如何在另一个pthread中运行V8代码?
请注意,这段代码没有任何segfaults。
int jack_process(jack_nframes_t nframes, void *arg)
{
Local<Value> test;
return 0;
}
谢谢。
您使用的是哪个版本的v8?在最新版本中没有新的方法,只需要处理,你应该通过一个指针来隔离:这是一个定义:'本地本地 ::新(隔离*隔离,处理那个);' –
'$ node --version' 'v0.10.24' – Applejohn
反正在主线程中工作正常。 – Applejohn