Skip to content

Commit

Permalink
Fix Ubuntu queue priority not set
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioBrancati committed Apr 3, 2024
1 parent 31aa57c commit b0ace55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Sources/Queuer/ConcurrentOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,11 @@ open class ConcurrentOperation: Operation {
///
/// - Parameters:
/// - name: Operation name, useful for Queue Restoration. It must be unique.
/// - queuePriority: The execution priority of the operation in an operation queue.
/// - executionBlock: Execution block.
public init(name: String? = nil, queuePriority: QueuePriority = .normal, executionBlock: ((_ operation: ConcurrentOperation) -> Void)? = nil) {
public init(name: String? = nil, executionBlock: ((_ operation: ConcurrentOperation) -> Void)? = nil) {
super.init()

self.name = name
self.queuePriority = queuePriority
self.executionBlock = executionBlock
}

Expand Down
6 changes: 4 additions & 2 deletions Tests/QueuerTests/QueuerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ import Dispatch
import XCTest

internal class QueuerTests: XCTestCase {
// #if !os(Linux)
internal func testOperationCount() {
let queue = Queuer(name: "QueuerTestOperationCount")
let testExpectation = expectation(description: "Operation Count")

// XCTAssertEqual(queue.operationCount, 0)
XCTAssertEqual(queue.operationCount, 0)

let concurrentOperation = ConcurrentOperation { _ in
Thread.sleep(forTimeInterval: 2)
Expand All @@ -44,9 +45,10 @@ internal class QueuerTests: XCTestCase {

waitForExpectations(timeout: 5) { error in
XCTAssertNil(error)
// XCTAssertEqual(queue.operationCount, 0)
XCTAssertEqual(queue.operationCount, 0)
}
}
// #endif

internal func testOperations() {
let queue = Queuer(name: "QueuerTestOperations")
Expand Down

0 comments on commit b0ace55

Please sign in to comment.