Hi, I'm trying to make therubyracer support multithreaded Ruby applications. Currently, when the Ruby GC runs, it may dispose of no longer needed handles that were held from Ruby. The problem is, to do this you need to have the current Isolate locked, which is problematic because another thread might hold the lock than the one which is doing Ruby GC.
My thought was to do something rather than immediately dispose of the handles in the Ruby GC thread, but instead enqueue them somewhere to be disposed later, perhaps inside of a V8 GC callback. However, the docs declare that GC callbacks must not modify any objects or do anything which results in object allocation. Does merely disposing of persistent handles count? Also, even if it did work, would it be considered an abuse of GC callbacks? I'd like to avoid requiring a separate thread in every ruby app that uses therubyracer that's just for releasing V8 objects, but that might be another solution too. -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
