DenoDDeno
Powered by
AV6A
Denoβ€’3y agoβ€’
20 replies
AV6

calling a javascript function and waiting for the promise with `rusty_v8`

let result = function.call(scope, recv, &[]).expect("couldnt run");
/*i got this result which is a promise. now how do i get the value of the promise

let value = ??
*/
let result = function.call(scope, recv, &[]).expect("couldnt run");
/*i got this result which is a promise. now how do i get the value of the promise

let value = ??
*/

result.is_promise
result.is_promise
is
true
true

promise state is
Pending
Pending

scope.has_pending_background_tasks()
scope.has_pending_background_tasks()
is
false
false
which confuses me. Isnt this supposed to be true if there are unresolved promises?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

rusty_v8 extracting stack trace when a promise rejects
AV6AAV6 / help
3y ago
How to build rusty_v8 with old v8 version?
RaefkoRRaefko / help
3y ago