ctietze,
@ctietze@mastodon.social avatar

async/await question:

This function produces one (1) array of results asynchronously:

func doTheThing() async -> [Result]

How would you write a (search/fetch/...) service that produces results in batches? E.g. if there are multiple data sources?

Am thinking of RxSwift's window.

Maybe return an array of the array of results, aka an AsyncSequence?

Or AsyncStream? 🤔

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • kavyap
  • thenastyranch
  • GTA5RPClips
  • tester
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • cisconetworking
  • JUstTest
  • khanakhh
  • normalnudes
  • osvaldo12
  • tacticalgear
  • anitta
  • Durango
  • ethstaker
  • modclub
  • Leos
  • provamag3
  • cubers
  • megavids
  • lostlight
  • All magazines