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
I am a bit surprised to see that the cancel implementation of Operation calls finish by itself, if state > .Ready. Shouldn't cancel only mark the operation as cancelled ? Isn't it the responsibility of the operation to check for this flag, and if true, stop its work, clean up and only then transition to the finished state? Or am I missing something?
I am a bit surprised to see that the
cancelimplementation ofOperationcallsfinishby itself, ifstate > .Ready. Shouldn'tcancelonly mark the operation as cancelled ? Isn't it the responsibility of the operation to check for this flag, and iftrue, stop its work, clean up and only then transition to thefinishedstate? Or am I missing something?