Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Should the observer.operationDidFinish be called after state = .finished #113

Closed
bmkor opened this issue Aug 25, 2018 · 1 comment
Closed

Comments

@bmkor
Copy link

bmkor commented Aug 25, 2018

for observer in observers {
observer.operationDidFinish(self, errors: internalErrors)
}
state = .finished

Just wondering if the state = .finished should be before the for observer in observers ....
The reasons are

  • the description says operationDidFinish;
  • the execution code in the operationDidFinish may assume the operation is finished; for example, its operationqueue will not contain the operation if it is marked as finished.
@jjatie
Copy link

jjatie commented Nov 27, 2018

Are you proposing an operationWillFinish method? Changes to this behaviour would break many observers in my code, and I imagine many others'.

@bmkor bmkor closed this as completed Sep 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants