[v8-users] Re: multiple instance of v8 in one process

2013-03-11 Thread Neha
Hi, Tried to create multiple instance of v8 in my process using isolate. In Thread A i have the following code. (this is a worker thread and the following code is called only when there is update in the javascript) v8::Isolate* isolate2 = v8::Isolate::New(); {

Re: [v8-users] Re: multiple instance of v8 in one process

2013-03-11 Thread Sven Panne
v8::Locker::IsActive() is just telling you that a v8::Locker has been used before *somewhere* in your program, not necessarily in your thread or for your current Isolate. This means: IsActive is basically useless, and I consider it to be on death row for deprecation/removal. Apart from that API

Re: [v8-users] Re: multiple instance of v8 in one process

2013-03-11 Thread Sven Panne
Re-reading your original mail, I am not 100% sure what you are trying to achieve by using separate Isolates and threads: Sharing *anything* JavaScript-ish between different Isolates is by definition impossible (hence the name ;-). An Isolate is a complete separate instance of the VM, and of course

Re: [v8-users] Re: multiple instance of v8 in one process

2013-03-11 Thread Neha
Thanks Sven Panne for the information. My requirement is that my application has two threads, worker thread (Thread A) and main thread (Thread B). While the main thread at the start precompiles the scripts and runs it. The worker thread , dynamically recieves the updated javascript and

Re: [v8-users] Re: multiple instance of v8 in one process

2013-03-11 Thread Sven Panne
What you are describing is again not a statement of the problem in itself, but an attempt to solve something. What in detail that is, is still unclear to me. I think you are mixing up the concepts of Context and Isolate: An Isolate a concept for strictly, well, isolating several V8 instances