{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/futures-rs/issues/1051","repository_url":"https://api.github.com/repos/rust-lang-nursery/futures-rs","labels_url":"https://api.github.com/repos/rust-lang-nursery/futures-rs/issues/1051/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/futures-rs/issues/1051/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/futures-rs/issues/1051/events","html_url":"https://github.com/rust-lang-nursery/futures-rs/pull/1051","id":336431770,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3ODg2OTQ0","number":1051,"title":"Add preliminary versions of variadic join and select","user":{"login":"cramertj","id":5963049,"node_id":"MDQ6VXNlcjU5NjMwNDk=","avatar_url":"https://avatars1.githubusercontent.com/u/5963049?v=4","gravatar_id":"","url":"https://api.github.com/users/cramertj","html_url":"https://github.com/cramertj","followers_url":"https://api.github.com/users/cramertj/followers","following_url":"https://api.github.com/users/cramertj/following{/other_user}","gists_url":"https://api.github.com/users/cramertj/gists{/gist_id}","starred_url":"https://api.github.com/users/cramertj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramertj/subscriptions","organizations_url":"https://api.github.com/users/cramertj/orgs","repos_url":"https://api.github.com/users/cramertj/repos","events_url":"https://api.github.com/users/cramertj/events{/privacy}","received_events_url":"https://api.github.com/users/cramertj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-28T00:21:58Z","updated_at":"2018-06-28T07:03:52Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/futures-rs/pulls/1051","html_url":"https://github.com/rust-lang-nursery/futures-rs/pull/1051","diff_url":"https://github.com/rust-lang-nursery/futures-rs/pull/1051.diff","patch_url":"https://github.com/rust-lang-nursery/futures-rs/pull/1051.patch"},"body":"This is a super-simplified first pass at `join` and `select` macros for the async/await world. They both work, but `select` especially has lots of room for improvement: futures and streams that are passed to it multiple times (after they have previously completed) will panic since futures can't be polled after completion. One option to address this would be to add `FusedFuture` and `FusedStream` traits similar to `FusedIterator` that provide `is_done` methods for checking whether the future in question has completed (since if all futures/streams are exhausted, we need to visit some kind of \"default\" case for the `select`). There's also the additional complication that such an `is_done` method would also have to discern between \"yielded `None`\" and \"will yield `None`\", since it may be the case that you want to handle the moment a stream is closed, but after that you still want to `select` over it and have it act like a completed future (that is, provide is_done = true and fall through to `default` rather than providing `None`).\r\n\r\nI also think we should, at least temporarily, keep around the old `join` and `select` functions (adding an `Unpin` bound to `select`) to make it easier to migrate existing code that isn't async/await-based."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/futures-rs/issues/comments/400933817","html_url":"https://github.com/rust-lang-nursery/futures-rs/pull/1051#issuecomment-400933817","issue_url":"https://api.github.com/repos/rust-lang-nursery/futures-rs/issues/1051","id":400933817,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDkzMzgxNw==","user":{"login":"MajorBreakfast","id":340142,"node_id":"MDQ6VXNlcjM0MDE0Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/340142?v=4","gravatar_id":"","url":"https://api.github.com/users/MajorBreakfast","html_url":"https://github.com/MajorBreakfast","followers_url":"https://api.github.com/users/MajorBreakfast/followers","following_url":"https://api.github.com/users/MajorBreakfast/following{/other_user}","gists_url":"https://api.github.com/users/MajorBreakfast/gists{/gist_id}","starred_url":"https://api.github.com/users/MajorBreakfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MajorBreakfast/subscriptions","organizations_url":"https://api.github.com/users/MajorBreakfast/orgs","repos_url":"https://api.github.com/users/MajorBreakfast/repos","events_url":"https://api.github.com/users/MajorBreakfast/events{/privacy}","received_events_url":"https://api.github.com/users/MajorBreakfast/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T07:03:52Z","updated_at":"2018-06-28T07:03:52Z","author_association":"COLLABORATOR","body":"These already look really convenient!\r\n\r\n- There probably should be some clear distinction between macros intended for use in async functions and other macros. Macros that internally use `await` should be marked somehow\r\n- For developers coming from JavaScript it would be extremely useful if `join` was called `all`. I'm just sayin' 🙂"}}
{"actor":{"display_login":"MajorBreakfast"}}