You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when you call init for the first time it can take a while (especially on a slow internet connection). During testing I often thought that the process is hanging until I enable debug logging just to discover that it's just busy downloading stuff. It might be worth it to add an alternate initialisation function that returns an async generator. This generator could then report the progress of the initialisation process.
The text was updated successfully, but these errors were encountered:
It turns out that you can add a return statement to return a final value for a generator. This would work well in this case since I can yield all progress updates and then return the final SteamCmd instance.
Using return in the above fashion won't work elegantly since the returned value takes the place of the last value in the iteration. So there is no real difference between yielding or returning the last value.
My current thinking is to repeatedly yield something like {steamCmd, progress}.
Another option that I could think of is making the function a normal function and then the generator and promise get returned to the caller. In practice it can look something like this:
Currently when you call
init
for the first time it can take a while (especially on a slow internet connection). During testing I often thought that the process is hanging until I enable debug logging just to discover that it's just busy downloading stuff. It might be worth it to add an alternate initialisation function that returns an async generator. This generator could then report the progress of the initialisation process.The text was updated successfully, but these errors were encountered: