DenoDDeno
Powered by
ExidexE
Denoβ€’3y ago
Exidex

Deno event loop and gui application

Hi, I am trying to write custom gtk library in deno using
gtk-rs
gtk-rs
and
deno_runtime
deno_runtime
. I already have initial rendering of components but i am having trouble understanding how to setup event loop for gui application. Currently i am using tokio's
new_current_thread
new_current_thread
and
block_on
block_on
on deno's
execute_main_module
execute_main_module
but this way setTimeouts don't seem to be executed which I suspect is because there is no event loop.
execute_main_module
execute_main_module
seems to already call
run_event_loop
run_event_loop
but should i just call it in loop or is there a proper way to do it using tokio? and how does
event_loop_middleware
event_loop_middleware
fit into all this?

The other slightly related question is how do i schedule updates from the button clicks if the click listener closure is setup in the
#[op(v8)]
#[op(v8)]
?

thanks for your help
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Event loop resolving prematurely
raaymaxRraaymax / help
2y ago
Loop Detected in Deno Deploy
wedmaniacWwedmaniac / help
16mo ago
Event Loop for a bot
πŸŽ€π”Έβ„•π”Ύπ”Όπ•ƒ π”»π•†π•ƒπ•ƒπ”½π”Έβ„‚π”ΌπŸŽ€πŸ‡΅πŸ‡ΈοΏ½πŸŽ€π”Έβ„•π”Ύπ”Όπ•ƒ π”»π•†π•ƒπ•ƒπ”½π”Έβ„‚π”ΌπŸŽ€πŸ‡΅πŸ‡Έ / help
2y ago