{"action":"created","issue":{"url":"https://api.github.com/repos/erik-kallen/SaltarelleCompiler/issues/382","labels_url":"https://api.github.com/repos/erik-kallen/SaltarelleCompiler/issues/382/labels{/name}","comments_url":"https://api.github.com/repos/erik-kallen/SaltarelleCompiler/issues/382/comments","events_url":"https://api.github.com/repos/erik-kallen/SaltarelleCompiler/issues/382/events","html_url":"https://github.com/erik-kallen/SaltarelleCompiler/issues/382","id":57094601,"number":382,"title":"Use of Promises instead of Tasks","user":{"login":"CheloXL","id":201414,"avatar_url":"https://avatars.githubusercontent.com/u/201414?v=3","gravatar_id":"","url":"https://api.github.com/users/CheloXL","html_url":"https://github.com/CheloXL","followers_url":"https://api.github.com/users/CheloXL/followers","following_url":"https://api.github.com/users/CheloXL/following{/other_user}","gists_url":"https://api.github.com/users/CheloXL/gists{/gist_id}","starred_url":"https://api.github.com/users/CheloXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheloXL/subscriptions","organizations_url":"https://api.github.com/users/CheloXL/orgs","repos_url":"https://api.github.com/users/CheloXL/repos","events_url":"https://api.github.com/users/CheloXL/events{/privacy}","received_events_url":"https://api.github.com/users/CheloXL/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-09T21:44:41Z","updated_at":"2015-05-29T12:07:46Z","closed_at":"2015-04-05T21:46:47Z","body":"It would be nice if instead of the Task class you can make use of the native Promise class. \r\n\r\nThe only issue with that is that Promises are greedy (so, awaiting a Promise<Promise<int>> would lead to the int result and not, as you can expect in c#, to a Promise<int>).\r\n"},"comment":{"url":"https://api.github.com/repos/erik-kallen/SaltarelleCompiler/issues/comments/106784284","html_url":"https://github.com/erik-kallen/SaltarelleCompiler/issues/382#issuecomment-106784284","issue_url":"https://api.github.com/repos/erik-kallen/SaltarelleCompiler/issues/382","id":106784284,"user":{"login":"erik-kallen","id":688028,"avatar_url":"https://avatars.githubusercontent.com/u/688028?v=3","gravatar_id":"","url":"https://api.github.com/users/erik-kallen","html_url":"https://github.com/erik-kallen","followers_url":"https://api.github.com/users/erik-kallen/followers","following_url":"https://api.github.com/users/erik-kallen/following{/other_user}","gists_url":"https://api.github.com/users/erik-kallen/gists{/gist_id}","starred_url":"https://api.github.com/users/erik-kallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erik-kallen/subscriptions","organizations_url":"https://api.github.com/users/erik-kallen/orgs","repos_url":"https://api.github.com/users/erik-kallen/repos","events_url":"https://api.github.com/users/erik-kallen/events{/privacy}","received_events_url":"https://api.github.com/users/erik-kallen/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T12:07:46Z","updated_at":"2015-05-29T12:07:46Z","body":"@nippur72 async/await doesn't work on Tasks, it works on any type that has a method (or extension method) called GetAwaiter. So if you define a method called GetAwaiter on your Future class you will be able to use that type with await."}}