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 what the difference is between async=true and async=false for vfs #49

Open
Kietyo opened this issue Jun 26, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@Kietyo
Copy link

Kietyo commented Jun 26, 2023

image

Like what's the difference between them, what's the benefit of using one over the other? What are some scenarios where I should I use one over the other.

@soywiz soywiz added the documentation Improvements or additions to documentation label Jun 26, 2023
@soywiz
Copy link
Member

soywiz commented Jun 26, 2023

We should add it to the documentation, but in the mean time:

  • The async is suspending functions
  • The non-async is not suspending (even if the functions are suspend)

It is useful for example for debugging/developing. Suspending sometimes don't give good stacktraces. For the one not suspending, you will have normal stacktraces.
It also allows for to run code within runBlockNoSuspensions { ... } since no suspensions happen, that works in common code. Alternatively runBlockingNoJs { ... } could work if you are not targetting JS in that codw.

@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