Thanks Jason.
Lock helps to get off the error:)

On Monday, January 21, 2013 12:24:59 PM UTC+5:30, Jason Del Ponte wrote:

> I'm pretty new to v8, but I believe the exception you're hitting is 
> because your code is accessing the v8 context before v8's lock was 
> incremented.  Common case for this would be if you have multiple threads 
> attempting to use the context at the same time. Creating a local v8::Locker 
> in your methods that are accessing context, (and HandleScope?) might 
> resolve your problem. 
>
> I ran into a similar problem with a library I'm retrofitting, which embeds 
> v8 within go. https://github.com/jasondelponte/go-v8.  Since multiple 
> "threads" could be accessing the context at once I needed to add the 
> v8:Locker to prevent this. v8 can only be used by a single thread at a 
> time.  I believe the isolate allow multiple instances of v8 in different 
> threads, but I haven't read enough about that yet to be very helpful there.
>
> Hope that helps
>
> On Sunday, January 20, 2013 3:32:39 AM UTC-8, Neha wrote: 
>>
>> How is v8::HandleScope handle_scope to be used.
>> When i use it in my application, i get error "Entering the v8 API without 
>> proper locking in place".
>>  
>> Any help on this?
>>
>

-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users

Reply via email to