-
Notifications
You must be signed in to change notification settings - Fork 117
Cannot create second runtime. #442
Comments
This is caused by this code. |
This is why we can't just start up the runtime again when we've previously called JS_ShutDown. |
I'm good with that as a constraint but I do need to be able to create multiple runtimes, that should be possible right? I tried adding this as the first line to the test so that the runtime count does not drop to 0 but that results in a SEGV.
|
Which is not to say that I would not accept pull requests to address this issue; just that #344 was introduced to ensure that the runtime did actually shut down when there is no clear synchronization point when multiple threads are in use. |
The easiest way to deal with your situation would be to create a global runtime that outlives every other one. EDIT: which I see you did... that shouldn't crash :< |
It seems
Runtime::new
can be called successfully only once on a thread.I get the
Err
result calling it a second time. This is on 0.9.2 on nightly-2018-10-12 on MacOS High Sierra.Running this test passes if assign() is called once, fails when called twice.
The text was updated successfully, but these errors were encountered: