On Thu, Jun 11, 2020 at 6:52 PM Jonathan Resnick <jresn...@gmail.com> wrote: > > I set up a weak callback like so: > > UniquePersistent<Object> target(isolate, obj); > target.SetWeak(args, MyCallback, v8::WeakCallbackType::kParameter); > > In my testing so far, it appears that MyCallback runs on the same thread as > the JS code is executing on. Is it safe to assume that this callback *always* > runs on the JS execution thread? I need to free some memory in this callback, > and obviously my code can be significantly simpler if I don't need to worry > about synchronizing access to my data-structures.
Yes, it runs on the same thread. -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAHQurc-2_fQZmKNkQZBi28uenxaAbf6K5kQ8XdyeHN4JQcXkvQ%40mail.gmail.com.