Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDO NOT MERGE: Multithreaded javascript #1587
Conversation
- JNI calls are now thread safe - Ability to retrieve the runtime from the currently entered isolate
|
whats the progress on this here? |
|
This PR was created as a POC to demonstrate the technical feasibility of this concept. Enabling it would break existing plugins and we are not planning on doing that at the moment. You may try it out in your application and report if you are experiencing any issues or performance improvements. |
|
@darind @NathanaelA Seeing this is not enabled by default. Could we merge it ? A user would have to know what he is doing as it would mean enabling in the package.json. |
|
@farfromrefug - It looks like it is enabled by default; but we could merge it and then set the flag to disabled by default. However, before I merge it I need to get the automated tests all working again so that I can make sure that even with this flag disabled that everything still works. Getting the testing all working properly is high on my list to try and get working, but I do have a couple other android issues that also need to be tracked down, so it depends on how quickly I can get these issues tracked down and fixed will decide how quickly this gets merged. I personally want to see this in NS 7, and enabled by default -- but we might have to settle for merged in NS7, but disabled by default... |
|
@NathanaelA agree about tests! About enabled by default in 7.0 i would be careful, we would need to test it in multiple and different production apps . As Darin said plugins would need to handle that correctly. |
|
It can be on by default for 8.x that should give plugin authors some time to update their plugins |
In this PR we are introducing the
enableMultithreadedJavascriptfeature flag which allows to execute javascript code from arbitrary threads.Consider the following example:
We have identified 3 tasks to implement the feature:
v8::Lockerobjects to ensure re-entrancy of the V8 isolatesRuntime.currentRuntimeshould not rely onThreadLocalstorage only. When running on a background thread it should retrieve the runtime from the currently entered V8 isolate.