Skip to content

Commit

Permalink
non isolated
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Maghzal committed Jan 29, 2023
1 parent 4525b0f commit 7cadc18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/NetworkUI/NetworkRequests/AsyncNetwork.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension Network {
}
throw error
}
public static func request<T: EndPoint, Model: Codable>(for endPoint: T, model: Model.Type, handled: Bool = true, withLoader: Bool = true) async throws -> Model {
nonisolated public static func request<T: EndPoint, Model: Codable>(for endPoint: T, model: Model.Type, handled: Bool = true, withLoader: Bool = true) async throws -> Model {
do {
NetworkData.shared.retries[endPoint.id.description] = (NetworkData.shared.retries[endPoint.id.description] ?? -1) + 1
let request = try requestBuilder(endPoint: endPoint)
Expand All @@ -41,7 +41,7 @@ extension Network {
return try await errorBuilder(endPoint: endPoint, error: error, model: Model.self, withLoader: withLoader, handled: handled)
}
}
public static func task<T: EndPoint, Model: Codable>(for endPoint: T, model: Model.Type, handled: Bool = true, withLoader: Bool = true) async throws -> Task<Model, Error> {
nonisolated public static func task<T: EndPoint, Model: Codable>(for endPoint: T, model: Model.Type, handled: Bool = true, withLoader: Bool = true) async throws -> Task<Model, Error> {
let task = Task { () -> Model in
do {
NetworkData.shared.retries[endPoint.id.description] = (NetworkData.shared.retries[endPoint.id.description] ?? -1) + 1
Expand Down

0 comments on commit 7cadc18

Please sign in to comment.