Skip to content

Commit

Permalink
ability to specify only DispatchQueue qos if using global queue when …
Browse files Browse the repository at this point in the history
…generating tokens
  • Loading branch information
alexeichhorn committed Jan 28, 2022
1 parent 182eb02 commit f348c39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/JSONWorkProof/JWP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ public struct JWP {
}
}

/// - parameter qos: determines quality of service of global dispatch queue to run in
public func generate(claims: [String: Codable], expiration: Date? = Date() + 5*60, qos: DispatchQoS.QoSClass) async throws -> String {
try await generate(claims: claims, expiration: expiration, in: DispatchQueue.global(qos: qos))
}


// MARK: - Decode

Expand Down

0 comments on commit f348c39

Please sign in to comment.