zlacker

[parent] [thread] 0 comments
1. sodali+(OP)[view] [source] 2024-01-20 01:31:12
I was calling await on ws_stream.next() - awaiting for there to be a new message.

Code: https://gist.github.com/sigaloid/d0e2a7eb42fed8c2397fbf84239...

In the example you give, yes, it's just sequential and everything relies on a previous thing. But say you are making a spotify frontend - you want to render a list of playlists, the profile info, etc - you call await on all of them and they can complete simultaneously.

[go to top]