Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
NikSativa committed Mar 30, 2023
1 parent 4645653 commit 969bd1a
Show file tree
Hide file tree
Showing 10 changed files with 263 additions and 369 deletions.
26 changes: 4 additions & 22 deletions Package.resolved
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
"state" : {
"revision" : "f809deb30dc5c9d9b78c872e553261a61177721a",
"version" : "2.0.0"
"revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea",
"version" : "2.1.1"
}
},
{
Expand All @@ -18,31 +18,13 @@
"version" : "2.1.0"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "b7f6c49acdb247e3158198c5448b38c3cc595533",
"version" : "11.2.1"
}
},
{
"identity" : "nspry",
"kind" : "remoteSourceControl",
"location" : "https://github.com/NikSativa/NSpry.git",
"state" : {
"revision" : "ac81bc9c46e2e79905b8b066d9f19964584f4dce",
"version" : "1.3.3"
}
},
{
"identity" : "quick",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Quick.git",
"state" : {
"revision" : "16910e406be96e08923918315388c3e989deac9e",
"version" : "6.1.0"
"revision" : "eb1afc57f1c6a425f19a00dd7d06f3f681821e40",
"version" : "2.0.0"
}
}
],
Expand Down
26 changes: 13 additions & 13 deletions Package.swift
Expand Up @@ -6,32 +6,32 @@ let package = Package(
name: "NQueue",
platforms: [
.iOS(.v13),
.macOS(.v10_15)
.macOS(.v11)
],
products: [
.library(name: "NQueue", targets: ["NQueue"]),
.library(name: "NQueueTestHelpers", targets: ["NQueueTestHelpers"])
],
dependencies: [
.package(url: "https://github.com/NikSativa/NSpry.git", .upToNextMajor(from: "1.2.9")),
.package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "6.1.0")),
.package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "11.2.1"))
.package(url: "https://github.com/NikSativa/NSpry.git", .upToNextMajor(from: "2.0.0"))
],
targets: [
.target(name: "NQueue",
dependencies: [],
dependencies: [
],
path: "Source"),
.target(name: "NQueueTestHelpers",
dependencies: ["NQueue",
"NSpry"],
dependencies: [
"NQueue",
"NSpry"
],
path: "TestHelpers"),
.testTarget(name: "NQueueTests",
dependencies: ["NQueue",
"NQueueTestHelpers",
"NSpry",
.product(name: "NSpry_Nimble", package: "NSpry"),
"Nimble",
"Quick"],
dependencies: [
"NQueue",
"NQueueTestHelpers",
"NSpry"
],
path: "Tests")
]
)
@@ -1,3 +1,4 @@
import Dispatch
import Foundation

public extension DispatchTimeInterval {
Expand All @@ -6,3 +7,9 @@ public extension DispatchTimeInterval {
return .nanoseconds(nano)
}
}

public extension DispatchTime {
static func delayInSeconds(_ seconds: Double) -> Self {
return .now() + .seconds(seconds)
}
}
14 changes: 7 additions & 7 deletions Source/Queue.swift
Expand Up @@ -24,39 +24,39 @@ public struct Queue: Equatable {
case userInteractive
}

public static var main: Queueable {
public static var main: Self {
return Queue(kind: .main,
sdk: .main)
}

public static var background: Queueable {
public static var background: Self {
return Queue(kind: .background,
sdk: .global(qos: .background))
}

public static var utility: Queueable {
public static var utility: Self {
return Queue(kind: .utility,
sdk: .global(qos: .utility))
}

public static var `default`: Queueable {
public static var `default`: Self {
return Queue(kind: .default,
sdk: .global(qos: .default))
}

public static var userInitiated: Queueable {
public static var userInitiated: Self {
return Queue(kind: .userInitiated,
sdk: .global(qos: .userInitiated))
}

public static var userInteractive: Queueable {
public static var userInteractive: Self {
return Queue(kind: .userInteractive,
sdk: .global(qos: .userInteractive))
}

public static func custom(label: String,
qos: DispatchQoS = .default,
attributes: Attributes = .concurrent) -> Queueable {
attributes: Attributes = .concurrent) -> Self {
return Queue(kind: .custom(label: label,
qos: qos,
attributes: attributes),
Expand Down
223 changes: 0 additions & 223 deletions Tests/DelayedQueueSpec.swift

This file was deleted.

0 comments on commit 969bd1a

Please sign in to comment.