On Thu, Dec 8, 2016 at 12:35 AM, Jane Chen <[email protected]> wrote: > Just upgraded v8 from 4.6 to 5.3 and found a new behavior: garbage > collection can happen in a background thread after > ContextDisposedNotification and IdleNotificationDeadline return. My > idleNotificationDeadline runs in a loop with 1sec increments, and it > typically comes out after 1 or 2 iterations. > > My application has its own book keeping on allocated objects, so when > IdleNotificationDeadline returns, while still in the Isolate, it forcefully > cleans up the leftover references held from v8 weak callback params. > > Apparently starting from 5.3, a race condition starts to happen during the > above routine. > > I experimented using the GC callbacks to track GC activity. But even when > the callback indicates GC is done, I still run into the race condition. > > I'd hate to put in a mutex just for this due to performance concerns. Would > be nice to have a reliably way to tell when GC is done. > > Appreciate any advice on this.
I don't quite understand where the race condition is. You mean you expect weak callbacks to run before IdleNotificationDeadline() returns? Some example code might be useful. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
