{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/28546","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/28546/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/28546/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/28546/events","html_url":"https://github.com/dotnet/corefx/issues/28546","id":309289951,"number":28546,"title":"ValueTask<T> and ValueTask should implement the same common interface","user":{"login":"nockawa","id":3279175,"avatar_url":"https://avatars1.githubusercontent.com/u/3279175?v=4","gravatar_id":"","url":"https://api.github.com/users/nockawa","html_url":"https://github.com/nockawa","followers_url":"https://api.github.com/users/nockawa/followers","following_url":"https://api.github.com/users/nockawa/following{/other_user}","gists_url":"https://api.github.com/users/nockawa/gists{/gist_id}","starred_url":"https://api.github.com/users/nockawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nockawa/subscriptions","organizations_url":"https://api.github.com/users/nockawa/orgs","repos_url":"https://api.github.com/users/nockawa/repos","events_url":"https://api.github.com/users/nockawa/events{/privacy}","received_events_url":"https://api.github.com/users/nockawa/received_events","type":"User","site_admin":false},"labels":[{"id":881802182,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Threading.Tasks","name":"area-System.Threading.Tasks","color":"d4c5f9","default":false},{"id":309869280,"url":"https://api.github.com/repos/dotnet/corefx/labels/question","name":"question","color":"207de5","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":1993,"closed_issues":105,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2018-03-28T16:35:53Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2018-03-28T09:34:06Z","updated_at":"2018-03-28T16:35:53Z","closed_at":"2018-03-28T16:35:53Z","author_association":"NONE","body":"Both class could implement an interface like this one\r\n```csharp\r\n    public interface IValueTask\r\n    {\r\n        bool IsCanceled { get; }\r\n        bool IsCompleted { get; }\r\n        bool IsCompletedSuccessfully { get; }\r\n        bool IsFaulted { get; }\r\n    }\r\n```\r\nAnother method could be added to the interface to access the underlying Task, returning a `Task` object which is possible as `Task<T>` derived from `Task`.\r\n```csharp\r\nTask UnderlyingTask(): // For a lack of a better name...\r\n```\r\n\r\nThis way we could store `IValueTask` fields in our custom types that would address either `ValueTask` or any kind of `ValueTask<T>`\r\n\r\nI'm aware this would introduce Boxing to define IValueTask members, but maybe it is an acceptable choice when the alternative would be to store many members because of many different `<T>`...\r\n\r\n"}}
{"actor":{"display_login":"nockawa"}}