# HG changeset patch # User Sara # Date 1391273217 28800 # Node ID 469c49d5aa0230391ad740ba2ae15f874a8cba28 # Parent b3ad79b3197c3047bf5d01b2ea74ed38c69680ce this is the 2nd code diff -r b3ad79b3197c -r 469c49d5aa02 V8/Two_threads.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/V8/Two_threads.cpp Sat Feb 01 08:46:57 2014 -0800 @@ -0,0 +1,63 @@ +#include +#include +using namespace v8; +Isolate* isolate; +void* threadFunction(void*){ +//Isolate* isolate1 = Isolate::New(); +//{ + if(isolate == NULL){ + printf("Error1"); + return 0; +} +Locker locker1(isolate); +//isolate->Enter(); +Isolate::Scope isolate_scope1(isolate); +HandleScope handle_scope1(isolate); +Handle context1 = Context::New(isolate); + Context::Scope context_scope1(context1); + Handle source1 = String::NewFromUtf8(isolate, "'Hi' + ', Sara'"); + Handle