Skip to content

Don't propagate pause/resume/cancel to upstream. #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 25, 2014

Conversation

inamiy
Copy link
Member

@inamiy inamiy commented Dec 25, 2014

This pull request will fix super weird misinterpretation in #10.

For example,

let task3 = task1.then { ...
    return task2
}

when task3.pause() is invoked,

As-Is (from #10)

  • task1.pause() if task1 is still running
  • task2.pause() if task1 is either fulfilled or rejected & task2 is still running

To-Be

  • DON'T EVER CALL task1.pause() because task1 should be totally independent from task3, as task1 is capable of multiple-then() handling (let's say task3a, task3b, task3c is created via multiple task1.then(), but no one want task3a.cancel() to fail task1 and thus delivering rejected-errorInfo to task3b & task3c).
  • only task2.pause() if task1 is either fulfilled or rejected & task2 is still running

…e chained-task-pause/resume bug & try() bug.
…ault, but do so only in try() method instead (partially reverting #10 d489ef9)
inamiy added a commit that referenced this pull request Dec 25, 2014
Don't propagate pause/resume/cancel to upstream.
@inamiy inamiy merged commit aad1fc8 into master Dec 25, 2014
@inamiy inamiy deleted the no-cancelling-upstream branch December 25, 2014 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant