Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aataraxiaa/f5d56c9e4e1b09b36bc9bd7f04284134 to your computer and use it in GitHub Desktop.

Select an option

Save aataraxiaa/f5d56c9e4e1b09b36bc9bd7f04284134 to your computer and use it in GitHub Desktop.

Revisions

  1. aataraxiaa created this gist Jul 16, 2021.
    6 changes: 6 additions & 0 deletions SwiftConcurrency_AnIntroduction_AsyncCodeSequential.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    func fetchDataPair(from urls: (URL, URL)) async throws -> (ModelWrapper, ModelWrapper) {

    let resultOne = try await fetchData(from: urls.0)
    let resultTwo = try await fetchData(from: urls.1)
    return (resultOne, resultTwo)
    }