Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

fixed state inconstancy when cancelling task #11

Merged
merged 9 commits into from
Feb 9, 2017

Conversation

RaimarT
Copy link
Contributor

@RaimarT RaimarT commented Feb 8, 2017

I encountered a problem when cancelling a task that's in pending state because it has a dependency on another task that's still running. As you just returned true for isReady property when in pending state start() is called on the cancelled task calling moveToFinishedState() leading to an illegal state transition from .pending to .finished. I solved this issue by setting the task's state to .ready as soon as super.isReady returns true. Added appropriate test.

@saidsikira saidsikira merged commit e1a2ac1 into saidsikira:master Feb 9, 2017
@saidsikira saidsikira added this to the 0.2.3 milestone Feb 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants