Mads,

The problem as I see it is not when V8 GC runs, but when Ruby GC runs.
At that time, I have one heterogeneous list of handles that could
belong to any number of different isolates. It is then that I would
like to partition these handles into a bag per isolate. That way, when
V8 GC runs in the context of each isolate, I can call GetCurrent() and
dispose of all the handles in that isolate's bag. Does that make more
sense?

Note that I don't actually support multiple isolates at the moment,
but I do foresee this as a potential problem in the future.

On Jun 15, 2:21 am, Mads Sig Ager <[email protected]> wrote:
> Hi Charles,
>
> when you get the callback you will have to be using that isolate. So getting
> the isolate should be as simple as doing Isolate::GetCurrent() and then add
> the handle to the list for that isolate?
>
> Cheers,     -- Mads
>
> On Wed, Jun 15, 2011 at 9:17 AM, Jedrzej Nowacki
> <[email protected]>wrote:
>
>
>
>
>
>
>
> > Hi,
>
> >  You can keep the isolate pointer inside an internal field. Depending on
> > the
> > handles template type:
>
> > Object::SetInternalField
> > Script::setData
> > Context::setData
>
> > Cheers,
> >  Jedrek
>
> > On Tuesday 14. June 2011 22.50.08 ext Charles Lowell wrote:
> > > Given a persistent handle, is it possible to find out the Isolate with
> > > which it is associated. The reason I say is that I've change
> > > therubyracer to queue up handles to be released in a single spot where
> > > it is safe to lock V8 (not the Ruby GC thread). When ruby GC sees a
> > > disposable handle, I'd like to add it to a queue associated with that
> > > handle's Isolate so that the queue can later be emptied in the scope
> > > of that Isolate.
>
> > > We don't support multiple Isolates yet, so I can get away with having
> > > a single queue per Ruby process, but to add support in the future, it
> > > would make things a easier. Ideas?
>
> > > cheers,
> > > Charles
>
> > --
> > v8-users mailing list
> > [email protected]
> >http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to