{"action":"closed","issue":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/796","labels_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/796/labels{/name}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/796/comments","events_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/796/events","html_url":"https://github.com/petkaantonov/bluebird/issues/796","id":109992162,"number":796,"title":"cancel() with force parameter!","user":{"login":"edvinv","id":3840701,"avatar_url":"https://avatars.githubusercontent.com/u/3840701?v=3","gravatar_id":"","url":"https://api.github.com/users/edvinv","html_url":"https://github.com/edvinv","followers_url":"https://api.github.com/users/edvinv/followers","following_url":"https://api.github.com/users/edvinv/following{/other_user}","gists_url":"https://api.github.com/users/edvinv/gists{/gist_id}","starred_url":"https://api.github.com/users/edvinv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edvinv/subscriptions","organizations_url":"https://api.github.com/users/edvinv/orgs","repos_url":"https://api.github.com/users/edvinv/repos","events_url":"https://api.github.com/users/edvinv/events{/privacy}","received_events_url":"https://api.github.com/users/edvinv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-06T11:51:34Z","updated_at":"2015-10-06T12:01:47Z","closed_at":"2015-10-06T12:01:47Z","body":"Hi,\r\nI have a project with very complex promise structure that should be in some situation canceled from root promise. The problem is that it is very easy to forget marking a promise as cancellable but very difficult to find such a bug. So IMHO it will be very good to have additional force parameter in cancel method.  Without it or when it is false it will work the same way as it is working now, but if you set it to true it will not only cancel promises that are marked as cancellable but also those that are not marked at all, but stop at promises marked as uncancellable. So you will  now have an option not to mark promises as cancellable, but forcing cancellation with force parameter and only mark those points where you want to stop cancellation. This way there will be considerably less work in cases where all promises chain should be cancelled, because you will only have to call cancel() with true parameter and more importantly you will not have to worry that you forgot to call cancellable few months later when you add some additional promises to the chain.\r\n\r\nthanks\r\n"}}