Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioBrancati committed Oct 31, 2018
1 parent 7c50467 commit 74ca9be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -370,7 +370,7 @@ semaphore.wait()

### Queue State Restoration (Beta)
To enable the Queue Restoration feature you must use `ConcurrentOperation` with a unique (non-nil) `name` property.
Currently this feature allows you to save the current state of you queue, like: `name`, `progress` and `dependencies`.<br>
Currently this feature allows you to save the current state (`OperationState`s) of your queue, like: `name`, `progress` and `dependencies`.<br>
The `progress` property allows to save the current state of the `Operation` progress. Update it constantly during the `Operation` execution.<br>
Call `Queuer.state(of: OperationQueue)` or `operationQueue.state()` to get the `QueueStateList` aka: Array of `OperationState`s.<br>
It's up to you save and retrieve this list, and create the queue correctly.
Expand Down
7 changes: 1 addition & 6 deletions Tests/QueuerTests/QueuerTests.swift
Expand Up @@ -331,7 +331,7 @@ internal class QueuerTests: XCTestCase {
internal func testQueueState() {
let queue = Queuer(name: "QueuerTestPauseAndResume")
let testExpectation = expectation(description: "Pause and Resume")
var state: Queuer.QueueStateList?
var state: Queuer.QueueStateList = []

let concurrentOperation1 = ConcurrentOperation(name: "Test1") { operation in
operation.progress = 50
Expand All @@ -351,11 +351,6 @@ internal class QueuerTests: XCTestCase {
waitForExpectations(timeout: 5) { error in
XCTAssertNil(error)

guard let state = state else {
XCTFail()
return
}

XCTAssertEqual(state.count, 2)
XCTAssertEqual(state[0].name, "Test1")
XCTAssertEqual(state[0].progress, 50)
Expand Down

0 comments on commit 74ca9be

Please sign in to comment.