Binding Async Java Functions to JavaScript #71
-
Hi, I am trying to bind a Java method to JavaScript but couldn't figure out how to use it with Promise. Thanks Example usage: Java: class Service {
public String longRunningTask() {
return "done";
}
} JavaScript: var myFunc = async function() {
var service = new Service();
await service.longRunningTask();
}; Note: I am using pure v8 without node support. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Nice catch. That piece of work hasn't been fully implemented, as I'm adding the Proxy based injection now. Promise is a wonderful feature that requires certain amount of work. You are welcome to discord (link is at home page), discussing that with me in detail. |
Beta Was this translation helpful? Give feedback.
-
Please check out the source code of Javenode that has many practical usage of |
Beta Was this translation helpful? Give feedback.
Please check out the source code of Javenode that has many practical usage of
Promise
for async operations.