You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
for the executing operations , call cancel() don't finish the operation really, the method just mark the operations' state as hasFinished and remove the operations from the queue, in fact these operations are still running.
The text was updated successfully, but these errors were encountered:
@ichagall That is the expected behavior. cancel() just sets the state, but does not itself call finish() -- you have to also do that.
EDIT: Looks like PSOperations works differently from the WWDC Operations project. From what I can tell cancel() does in fact call finish() -- I think this makes more sense.
override open func cancel() {
stateLock.withCriticalScope {
if isFinished {
return
}
_cancelled = true
if state > .ready {
finish()
}
}
}
for the executing operations , call cancel() don't finish the operation really, the method just mark the operations' state as hasFinished and remove the operations from the queue, in fact these operations are still running.
The text was updated successfully, but these errors were encountered: