Closed cowboyd closed 8 months ago
I might look into this in the near future. Is there any work done in that regard?
Also, what happens if two Ruby threads try to run Javascript? Will they compete over the JS lock and one of them will wait until the other completes? Are there known race conditions here that we need to handle?
@thedrow Yes, there has been a lot of work toward that end, but unfortunately, I have not be able to complete it.
https://github.com/cowboyd/therubyracer/tree/upgrade-to-v8-4.5
Right now, no other thread can be in ruby while javascript is executing because both the V8 lock and the Ruby locks are held. We want to release the ruby gvl before acquiring the v8 lock, In the event that javascript code calls out to Ruby, we want to release the v8 lock and then acquire the gvl.