Wait this isn’t fair. You should calculate the time AFTER the try await (so after pokemonData)
@swiftandtips3 жыл бұрын
Hi @TrueStop, well, yes and no hehe. I mean, What was showed is correct, because the idea of async let is to not execute those statements sequentially and that's the point of the timer there, you can see that we reached it very fast, and in a real example, you could call other logic there without waiting for all the images. Maybe the example is too simple and could confuse you, but in this particular case, the time with async let is almost identical to await time, it's clearer to compare what is executed right away after the last async let statement. Anyway, you have a good point. Thank you for your comment! 😃
@israelmanzo87253 жыл бұрын
Beautiful .., thanks for this great explanation. Parallel download.. YEA!
@kigiphoto6383 жыл бұрын
Nice example, thanks!
@mig123943 жыл бұрын
Thanks for your tutorial but I have this error a server with the specified hostname could not be found pokeres.bastionhot.org/images/pokemon/1.png
@swiftandtips3 жыл бұрын
Hi @michel, thanks for the comment. I realized that after my demo that url didn't work anymore. I just updated the repo with a new URL that works :) github.com/pitt500/Async-Let
@BlumeAbra2 жыл бұрын
Awesome video. '?' mark is not printed. If print("Downloaded") and print("Downloading..") are kept between lines 36/37 and between lines 38/39, only "Downloaded" is printed. Need to clarify and check on one aspect. Tasks are spawned concurrently, all of them finish downloading, then only parent View is updated. This would be wrong if set of images is larger, say 200. It should act somewhat similar to - as user is scrolling (in say LazyVStack), network calls are made to fetch more images and populate parent View. How would that be accomplished - what would be solution scheme? What is needed is: as downloads are happening and finishing, it should update the parent View. Downloaded images should show up in LazyVStack, and those which are not yet downloaded should show with '_downloading_' or say '?' mark.