DenoDDeno
Powered by
ExidexE
Denoβ€’17mo agoβ€’
2 replies
Exidex

Pass JS function to an Op that can be called after the Op ends

Is there a way to have JS function to an Op that can be called after the Op ends?

The problem is that to call a function, v8::HandleScope is needed but only the reference to it is passed to an op.

The use case is: the op registers filesystem watcher and when change detected it should call js function that was passed as a parameter to and op. The runtime is kept running by a pending promise at another not related place.

Also I am still using op v1 so something may have changed in v2 which I am not aware of
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

mkdirsync is throwing an exception that can't be caught?
StokestackSStokestack / help
2y ago
How to make a function whose return type is inferred to be the same as an input function's
Guilherme C. SouzaGGuilherme C. Souza / help
3y ago
intercept an op rust-side and call the original fn
robtfmRrobtfm / help
2y ago