Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document: How does the runBlockingNoJs and runBlockingNoSuspensions work and what's the best way to use coroutines if we want to support js? #17

Open
Kietyo opened this issue Jan 7, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@Kietyo
Copy link

Kietyo commented Jan 7, 2022

No description provided.

@soywiz
Copy link
Member

soywiz commented Jan 7, 2022

Initial on-the-go reaponse ro add to the doc:

runBlockingNoJs works like runBlocking but throws in JS. It onyl works on Jvm, android and native

noSuspension version works on all the targets including JS, but only works when you call suspend functions but they don't suspend in the end.
This for example is used in the compression implementation to support calling uncompressing suspend functions that read data from memory without suspending.

Typically these functions are pretty edge-cased, and you won't use it in normal circumsntances.
Korge is already providing suspend bodies for most functions so you can suspend in almost any place without issues

@soywiz soywiz added the documentation Improvements or additions to documentation label Oct 11, 2022
@soywiz soywiz transferred this issue from soywiz-archive/docs-old.korge.org May 30, 2023
@soywiz soywiz transferred this issue from korlibs/korge Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Pending
Development

No branches or pull requests

2 participants