mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
protect against possible concurrency bug
This commit is contained in:
parent
885ea08cb0
commit
554c1c585d
1 changed files with 1 additions and 0 deletions
|
@ -80,6 +80,7 @@ typedef struct {
|
||||||
void* breaker(void *d) {
|
void* breaker(void *d) {
|
||||||
timeout_data* data = (timeout_data*)d;
|
timeout_data* data = (timeout_data*)d;
|
||||||
usleep(data->timeout*1000);
|
usleep(data->timeout*1000);
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||||
v8::V8::TerminateExecution(data->isolate);
|
v8::V8::TerminateExecution(data->isolate);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue