Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
JSR223 engine bindings not working for a second engine in another thread #5753
Script engine bindings work for any engine in any thread in any order.
I've noticed that the first engine always work as expected because
Engines created in other threads get un-prepared
The fix I can come up with after some debugging is to add
The different modes are rather poorly named. So you are saying only THREADSAFE gives the behavior you are expecting? That would fit my expectation; normally we try to isolate different threads because Ruby does not make a lot of language-level guarantees about concurrency.
@gregsh It is interesting but I'm not sure why it helps. The "top self" is normally only set up once, on the main thread...but I know we have done some defensive pre-pushing of frames and things that could explain why this helps.
Can you create an example app that shows the problems you're talking about? I'd like to be able to step through it.