{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/447","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/447/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/447/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/447/events","html_url":"https://github.com/dotnet/roslyn/issues/447","id":57518855,"number":447,"title":"CancellationToken is not correctly propagated downstream","user":{"login":"Pilchie","id":312835,"avatar_url":"https://avatars.githubusercontent.com/u/312835?v=3","gravatar_id":"","url":"https://api.github.com/users/Pilchie","html_url":"https://github.com/Pilchie","followers_url":"https://api.github.com/users/Pilchie/followers","following_url":"https://api.github.com/users/Pilchie/following{/other_user}","gists_url":"https://api.github.com/users/Pilchie/gists{/gist_id}","starred_url":"https://api.github.com/users/Pilchie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pilchie/subscriptions","organizations_url":"https://api.github.com/users/Pilchie/orgs","repos_url":"https://api.github.com/users/Pilchie/repos","events_url":"https://api.github.com/users/Pilchie/events{/privacy}","received_events_url":"https://api.github.com/users/Pilchie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"jasonmalinowski","id":201340,"avatar_url":"https://avatars.githubusercontent.com/u/201340?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmalinowski","html_url":"https://github.com/jasonmalinowski","followers_url":"https://api.github.com/users/jasonmalinowski/followers","following_url":"https://api.github.com/users/jasonmalinowski/following{/other_user}","gists_url":"https://api.github.com/users/jasonmalinowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmalinowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmalinowski/subscriptions","organizations_url":"https://api.github.com/users/jasonmalinowski/orgs","repos_url":"https://api.github.com/users/jasonmalinowski/repos","events_url":"https://api.github.com/users/jasonmalinowski/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmalinowski/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/6","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/6/labels","id":956299,"number":6,"title":"1.0-rc2","description":"\r\n\r\n<!---\r\n@huboard:{\"order\":0.5}\r\n-->\r\n","creator":{"login":"theoy","id":8222470,"avatar_url":"https://avatars.githubusercontent.com/u/8222470?v=3","gravatar_id":"","url":"https://api.github.com/users/theoy","html_url":"https://github.com/theoy","followers_url":"https://api.github.com/users/theoy/followers","following_url":"https://api.github.com/users/theoy/following{/other_user}","gists_url":"https://api.github.com/users/theoy/gists{/gist_id}","starred_url":"https://api.github.com/users/theoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theoy/subscriptions","organizations_url":"https://api.github.com/users/theoy/orgs","repos_url":"https://api.github.com/users/theoy/repos","events_url":"https://api.github.com/users/theoy/events{/privacy}","received_events_url":"https://api.github.com/users/theoy/received_events","type":"User","site_admin":false},"open_issues":62,"closed_issues":65,"state":"open","created_at":"2015-01-29T06:19:12Z","updated_at":"2015-02-20T00:31:52Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-02-12T21:01:18Z","updated_at":"2015-02-20T01:56:20Z","closed_at":null,"body":"Ported from TFS WorkItem: **1118674**\n\n------------------------------\n\n\r\n\r\n**Repro Steps:**\r\n\n\r\n\r\n**Repro:**\r\n\n\r\n\r\n1. create new TypeScript project (in Dev14)\r\n\n\r\n\r\n2. open .ts file, hit ctrl+s many times (this will invoke compile-on-save), make a few edits (add spaces) then keep saving the file. Eventually VS crashes.\r\n\n\r\n\r\n&nbsp;\r\n\n\r\n\r\n**Reason:**\r\n\n\r\n\r\nGist of current implementation of CompileOnSave in TypeScript \r\n\n\r\n\r\nvar cancellationToken = cts.Token;\r\n\n\r\n\r\ntry {\r\n\n\r\n\r\n&nbsp;&nbsp;&nbsp; await CompileAndSave(cancellationToken)\r\n\n\r\n\r\n}\r\n\n\r\n\r\ncatch(OperationCancelledException e) {\r\n\n\r\n\r\n&nbsp;&nbsp;&nbsp; if (e.CancellationToken == cancellationToken) {\r\n\n\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;\r\n\n\r\n\r\n&nbsp;&nbsp;&nbsp; }\r\n\n\r\n\r\n&nbsp;&nbsp;&nbsp; throw;\r\n\n\r\n\r\n}\r\n\n\r\n\r\n&nbsp;\r\n\n\r\n\r\nFor some reason TaskCancelledException that crashes VS contains cancellation token that is equal to CancellationToken.None and&nbsp;at glance it is thrown from inside the AsyncLazy&lt;T&gt; code in Roslyn"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/75177115","html_url":"https://github.com/dotnet/roslyn/issues/447#issuecomment-75177115","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/447","id":75177115,"user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars.githubusercontent.com/u/2642209?v=3","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T01:56:20Z","updated_at":"2015-02-20T01:56:20Z","body":"If we're concerned about the impact of two fields vs an allocation sometimes vs whatever other option, seems like some numbers would be useful to help make a decision? "}}