-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does not work on Nashorn #64
Comments
@salomvary ooo, I want to make this work. |
issue opened on parent project: tildeio/rsvp.js#330 I'll have this sorted out by the end of the weekend. |
@stefanpenner fyi i'm using this to polyfill |
looks like platform has a hook for next micro task. |
tildeio/rsvp.js#334 i'll bring that over here after i fix + update the build tooling |
@salomvary so, I'm dubious of this. Nashorn doesn't have the same run to completion model that essentially all other JavaScript environments have. The threading model allows virtually all of our code to be re-entrant. I don't believe we can reasonable ensure correctness if threads are being used without much more effort. I am open to suggestions or ideas on this.. |
Even Oracle is warning us on correctness when it comes to threading vs. nashorn. I'm not an expert of the field, can't give better suggestions atm |
this requires some additional runtime guarantees, we likely need to run all code touching promises in something that ensures run-to-completion. Maybe someone smarter then I has some ideas, but i believe this is out-of-scope of this project for now. Will reopen if some reasonable solution exists, but I believe this requires a runtime to wrap the code interacting with promises. Which likely would be another project itself |
Maybe someone from the Oracle team has recommendations? @szegedi wdyt? |
I am very open to recommendations :) |
Thanks, @stefanpenner, for looking into this. Have you by chance seen this talk by @william-tran about server-side JavaScript with Nashorn and Spring? https://youtu.be/kVyVyRdxwxE?t=1h17m37s |
any news on this? said talk pointed towards ListenableFuture, but I did not get it to work... |
@h0ru5 no, as mentioned above we could provide a serializable/thread-safe runtime around/integrated into nashorn to enable this, but I am unaware of something we can use today. The introduction of real threads in nashorn, really makes it incompatible with vast amounts of existing JavaScript. Although the above sounds like fun to implement, I really can't justify the time right now (non of my responsibilities have need for it) |
Due to the lack of
setTimeout
(and all the other alternatives).(Nashorn is the successor of Rhino).
The text was updated successfully, but these errors were encountered: