Skip to content

Commit 25b1e0a

Browse files
authored
Merge pull request #4 from shakurocom/II-16-fix_Task_Manager_and_update_dependency_version
Ii 16 fix task manager and update dependency version
2 parents 96d93a2 + bde75ac commit 25b1e0a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Shakuro.TaskManager.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Shakuro.TaskManager'
3-
s.version = '1.1.3'
3+
s.version = '1.1.4'
44
s.summary = 'Shakuro Task Manager'
55
s.homepage = 'https://github.com/shakurocom/TaskManager'
66
s.license = { :type => "MIT", :file => "LICENSE.md" }
@@ -10,6 +10,6 @@ Pod::Spec.new do |s|
1010
s.swift_version = ['5.1', '5.2', '5.3', '5.4', '5.5', '5.6']
1111
s.ios.deployment_target = '11.0'
1212

13-
s.dependency 'Shakuro.CommonTypes', '1.1.4'
13+
s.dependency 'Shakuro.CommonTypes', '~> 1.1'
1414

1515
end

Source/TaskManager.swift

100755100644
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,19 @@ private extension TaskManager {
241241
}
242242
allOperations.append(newOperation)
243243
newOperation.setInternalCompletion(queue: cleanupQueue, closure: { [weak self, weak newOperation] () -> Void in
244-
guard let strongSelf = self else {
244+
guard let strongSelf = self, let strongNewOperation = newOperation else {
245245
return
246246
}
247247
strongSelf.accessLock.execute({
248248
let indexToRemove = strongSelf.allOperations.firstIndex(where: { (operation) -> Bool in
249-
return operation === newOperation
249+
return operation === strongNewOperation
250250
})
251251
if let index = indexToRemove {
252252
strongSelf.allOperations.remove(at: index)
253253
}
254254
strongSelf.startOperationsNoLock()
255255
})
256-
newOperation?.executeOnCompleteCallbacks()
256+
strongNewOperation.executeOnCompleteCallbacks()
257257
})
258258
startOperationsNoLock()
259259
}

0 commit comments

Comments
 (0)