{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/fsharp/issues/7467","repository_url":"https://api.github.com/repos/dotnet/fsharp","labels_url":"https://api.github.com/repos/dotnet/fsharp/issues/7467/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/fsharp/issues/7467/comments","events_url":"https://api.github.com/repos/dotnet/fsharp/issues/7467/events","html_url":"https://github.com/dotnet/fsharp/pull/7467","id":487078742,"node_id":"MDExOlB1bGxSZXF1ZXN0MzEyNDE0NDQ4","number":7467,"title":"Change cancellation test to not depend on how AwaitTask works","user":{"login":"Frassle","id":1398274,"node_id":"MDQ6VXNlcjEzOTgyNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1398274?v=4","gravatar_id":"","url":"https://api.github.com/users/Frassle","html_url":"https://github.com/Frassle","followers_url":"https://api.github.com/users/Frassle/followers","following_url":"https://api.github.com/users/Frassle/following{/other_user}","gists_url":"https://api.github.com/users/Frassle/gists{/gist_id}","starred_url":"https://api.github.com/users/Frassle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frassle/subscriptions","organizations_url":"https://api.github.com/users/Frassle/orgs","repos_url":"https://api.github.com/users/Frassle/repos","events_url":"https://api.github.com/users/Frassle/events{/privacy}","received_events_url":"https://api.github.com/users/Frassle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-08-29T17:11:33Z","updated_at":"2019-09-01T21:49:13Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/dotnet/fsharp/pulls/7467","html_url":"https://github.com/dotnet/fsharp/pull/7467","diff_url":"https://github.com/dotnet/fsharp/pull/7467.diff","patch_url":"https://github.com/dotnet/fsharp/pull/7467.patch"},"body":"This test is to check that when an Async is started as a Task (via\r\nStartAsTask) that when cancelled the Task isn't immediately marked as\r\ncancelled but instead waits for the underlying Async to finish (normally\r\nvia cancellation)\r\n\r\nPrompted from comments on #7357."},"comment":{"url":"https://api.github.com/repos/dotnet/fsharp/issues/comments/526955586","html_url":"https://github.com/dotnet/fsharp/pull/7467#issuecomment-526955586","issue_url":"https://api.github.com/repos/dotnet/fsharp/issues/7467","id":526955586,"node_id":"MDEyOklzc3VlQ29tbWVudDUyNjk1NTU4Ng==","user":{"login":"Frassle","id":1398274,"node_id":"MDQ6VXNlcjEzOTgyNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1398274?v=4","gravatar_id":"","url":"https://api.github.com/users/Frassle","html_url":"https://github.com/Frassle","followers_url":"https://api.github.com/users/Frassle/followers","following_url":"https://api.github.com/users/Frassle/following{/other_user}","gists_url":"https://api.github.com/users/Frassle/gists{/gist_id}","starred_url":"https://api.github.com/users/Frassle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frassle/subscriptions","organizations_url":"https://api.github.com/users/Frassle/orgs","repos_url":"https://api.github.com/users/Frassle/repos","events_url":"https://api.github.com/users/Frassle/events{/privacy}","received_events_url":"https://api.github.com/users/Frassle/received_events","type":"User","site_admin":false},"created_at":"2019-09-01T21:49:13Z","updated_at":"2019-09-01T21:49:13Z","author_association":"NONE","body":"Prompted by comments on #7357 (which is a PR to fix #2127).\r\n\r\nIt was pointed out that `StartAsTaskCancellation` was added as part of #3256 which changed how cancellation worked for asyncs started via StartAsTask. Pre-3256 the task would cancel as soon as the cancellation token was triggered, while post-3256 the task only cancels once the underlying async has finished. `StartAsTaskCancellation` tested this by using the fact that `Async.AwaitTask` ignores async cancellation to create an async where it was easy to control when it cancelled.\r\n\r\nThat use of `AwaitTask` is in conflict with #2127/#7357 and it isn't actually necessary for the test of `StartAsTask`. There's also currently no test to show that `AwaitTask` can't be cancelled. This PR hopefully makes the current state clearer. There's one test to show that `AwaitTask` can't be cancelled, and another test to show that `StartAsTask` waits for the underlying async (with less dependence on how other async functions work because we're now blocking via a spin loop)."}}
{"actor":{"display_login":"Frassle"}}