Skip to content

Is it possible to embed deno_core with a self-managed event loop? #25799

Closed Answered by bartlomieju
linrongbin16 asked this question in Q&A
Discussion options

You must be logged in to vote

And the 2nd question is: does the API deno_core::JsRuntime::run_event_loop only run 1 tick? or it try to wait everything inside its internal queue to complete?

No, it runs for as long as event loop finishes all work. If you want to run a single "tick" you should use JsRuntime::poll_event_loop.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@linrongbin16
Comment options

@bartlomieju
Comment options

@linrongbin16
Comment options

Answer selected by linrongbin16
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants