On Sat, Feb 15, 2014 at 5:37 PM, Sara Abdelhameed
<
saraabdel...@gmail.com> wrote:
> I want to create 2 context, one after the other and within these 2 context
> compile and execute javascript, and finally pass this contexts and compiled
> javascript to two threads to execute the compiled script.
> the scenario is:
> 1- Create first context
> 2- Enter this context using context scope and create string containing
> javascript source code like"Hello, World"
> 3- compile and execute this script
> 4- Create the 2nd context
> 5- Enter the 2nd context using context scope and create 2nd string
> containing javascript code like "Good morning"
> 6- compile and run the script
> 7- declare 2 threads like this p_thread thread1, thread2;
> 8- pass the first context and the first compiled string to the first thread
> 9- pass the 2nd context and the 2nd compiled string to the 2nd thread
> I tried to do this by different strategy but I failed to make it run
> successfully, so is this scenario feasible? or it is impossible using
> v8-engine?
> thank you,
you do), then no, that's not possible. A context is tied to the