mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,4 Tsd.
aktive Profile

#asyncawait

0 Beiträge0 Beteiligte0 Beiträge heute

Can a Swift async method return multiple results over time? Different types, so I don’t think I can use AsyncSequence? Something like (pseudocode)

let (showProgress: async Bool, result: async MyThing) = await doSomethingLengthy()
if await showProgress {
showProgressScreen()
}
processResult(await result)

?

doSomethingLengthy() would guarantee that doProgress is fulfilled before result, in case that helps.

Or must it be a 2-method delegate?