{"action":"created","issue":{"url":"https://api.github.com/repos/domenic/cancelable-promise/issues/18","repository_url":"https://api.github.com/repos/domenic/cancelable-promise","labels_url":"https://api.github.com/repos/domenic/cancelable-promise/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/domenic/cancelable-promise/issues/18/comments","events_url":"https://api.github.com/repos/domenic/cancelable-promise/issues/18/events","html_url":"https://github.com/domenic/cancelable-promise/issues/18","id":159027060,"number":18,"title":"Can we have a syntactic sugar for `cancelToken.throwIfRequested`?","user":{"login":"inikulin","id":453071,"avatar_url":"https://avatars.githubusercontent.com/u/453071?v=3","gravatar_id":"","url":"https://api.github.com/users/inikulin","html_url":"https://github.com/inikulin","followers_url":"https://api.github.com/users/inikulin/followers","following_url":"https://api.github.com/users/inikulin/following{/other_user}","gists_url":"https://api.github.com/users/inikulin/gists{/gist_id}","starred_url":"https://api.github.com/users/inikulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inikulin/subscriptions","organizations_url":"https://api.github.com/users/inikulin/orgs","repos_url":"https://api.github.com/users/inikulin/repos","events_url":"https://api.github.com/users/inikulin/events{/privacy}","received_events_url":"https://api.github.com/users/inikulin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-06-07T21:18:23Z","updated_at":"2016-06-15T20:48:46Z","closed_at":null,"body":"I was just thinking about how cancel tokens paradigm can be applied to our existing code and it appears that we will need to call `cancelToken.throwIfRequested` nearly in all our async functions. This creates a lot of unecessary code noise. It would be nice to have an indicator that this particular function can be cancelled by passed token, e.g. :\r\n```js\r\nasync function foo (bar, cancelToken*) { // Just an example syntax\r\n    // Implicitly calls cancelToken.throwIfRequesed(); on call\r\n}\r\n```\r\nGoing even farther: implicity call `cancelToken.throwIfRequesed()` after each expression/statement in function. But IMHO it's too crazy.\r\n\r\nI know that this unlikely a good example of how this problem can be addressed, but anyway it would be nice if we will have some bikeshedding on this subject."},"comment":{"url":"https://api.github.com/repos/domenic/cancelable-promise/issues/comments/226315386","html_url":"https://github.com/domenic/cancelable-promise/issues/18#issuecomment-226315386","issue_url":"https://api.github.com/repos/domenic/cancelable-promise/issues/18","id":226315386,"user":{"login":"inikulin","id":453071,"avatar_url":"https://avatars.githubusercontent.com/u/453071?v=3","gravatar_id":"","url":"https://api.github.com/users/inikulin","html_url":"https://github.com/inikulin","followers_url":"https://api.github.com/users/inikulin/followers","following_url":"https://api.github.com/users/inikulin/following{/other_user}","gists_url":"https://api.github.com/users/inikulin/gists{/gist_id}","starred_url":"https://api.github.com/users/inikulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inikulin/subscriptions","organizations_url":"https://api.github.com/users/inikulin/orgs","repos_url":"https://api.github.com/users/inikulin/repos","events_url":"https://api.github.com/users/inikulin/events{/privacy}","received_events_url":"https://api.github.com/users/inikulin/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T20:48:46Z","updated_at":"2016-06-15T20:48:46Z","body":"Sorry for the delay with this one. Have a really busy week :disappointed_relieved: "}}
{"actor":{"display_login":"inikulin"}}