Let's say I got Int array and array for some class instances
var IDs = [Int]() var items = [Item]() For every item in IDs array I want to run async function to request item from server
for id in IDs { let item = requestItem(id) items.append(item) } As requestItem works in async way - how can execute code only after all items are loaded?