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
I used queue to wait for all requests finished like this:
var queue = Queue(parallel: 4);
for (final item in items) {
if(valid(item)) {
queue.add(() => _sendRequest(item));
}
}
await queue.onComplete;
print('completed');
For some reasons, if there is no valid item in for loop, the queue is empty. And in this case it pauses at await queue.onComplete forever.
Expect: it should allow to go through next line if queue is empty.
givip, akshdeep-singh, Chris1234567899, wolframm and rodion-nazarov