Skip to content
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

setTimeout from NodeJS does not work #209

Closed
Haringat opened this issue Nov 1, 2016 · 4 comments
Closed

setTimeout from NodeJS does not work #209

Haringat opened this issue Nov 1, 2016 · 4 comments
Labels

Comments

@Haringat
Copy link

Haringat commented Nov 1, 2016

I tried the following snippet in a NodeJS environment and in J2V8 NodeJS:

"use strict";
setTimeout(() => {
    console.log("callback called!");
},0);
console.log("synchronous");

In my local node installation the output was what I would expect:

synchronous
callback called!

In J2V8 though, the output was just this:

synchronous

OS: Linux x64
J2V8 version: 4.6.0

@TonyRice
Copy link
Contributor

Without looking directly at the code I do believe that you may need to implement these functions yourself. If I figure something out I will post back here!

@Haringat
Copy link
Author

Well, I thought so, but still it is irritating that the function is there, but doesn't work as expected. It would probably be better to remove it from the environment to hint people at the fact that they have to implement it themselves.
BTW: If you are still looking for something working, here is what I wrote (it has some dependency on Minecraft but those can be removed without touching the rest of the code):
https://github.com/Haringat/OpenJsComputers/blob/master/src/main/java/com/github/haringat/oc/v8/eventloop/EventLoop.java

@irbull
Copy link
Member

irbull commented Jan 11, 2019

It seems like many of the NodeJS things never worked properly. We are reducing the scope of this project to V8 on Android. If someone wants to build a downstream project that builds and maintains NodeJS support, I would be happy to help them set that up. Unfortunately, I don't have the cycles do that though and I think it's better to be honest about the work I can do. Please see #441 for more information.

@irbull irbull closed this as completed Jan 11, 2019
@irbull irbull added the nodejs label Jan 11, 2019
@huhuang03
Copy link

as #406 say. I can't figure out how to not release the object...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants