Closed Tchoupinax closed 5 years ago
Hi @Tchoupinax,
Take a look at the first item in this comment. In other words, all
is not intended to launch promises, it is an auxiliary synchronization construct to wait for them.
And as you've already figured out, in order to run promises simultaneously, you have to dispatch them on different queues, or on the one concurrent queue. Because there's the default queue used by all APIs, which is usually the main
serial one, and that can be configured, if needed.
Thanks.
Hello @shoumikhin,
Thank you to confirm that is the good way to do this. :)
RESOLVED: Previous code with DispatchQueue allows to make parrallel requests. :)
Hello,
I would like to use
all
method for revoving my promises in parrallel but it happens that promises are making one after one.My example code is the following :
All
method resolves after 30 secondes. Is it possible to make it to resolve after ten seconds ?Thank you, Have a nice day :)
EDIT:
This code takes 6 seconds instead of 8. So it works. But i have to specify each time a new queue for all of my promises ? Why
all
method could not do it by itself ?