{"action":"created","comment":{"url":"https://api.github.com/repos/tokio-rs/tokio/pulls/comments/173226959","pull_request_review_id":102372533,"id":173226959,"diff_hunk":"@@ -812,6 +821,35 @@ where T: Future<Item = (), Error = ()> + Send + 'static,\n     }\n }\n \n+#[cfg(feature = \"futures-0-2\")]\n+type Task2 = Box<futures2::Future<Item = (), Error = futures2::Never> + Send>;\n+\n+#[cfg(feature = \"futures-0-2\")]\n+impl futures2::executor::Executor for Sender {\n+    fn spawn(&mut self, f: Task2) -> Result<(), futures2::executor::SpawnError> {\n+        self.prepare_for_spawn()\n+            // TODO: get rid of this once the futures crate adds more error types\n+            .map_err(|_| futures2::executor::SpawnError::shutdown())?;\n+\n+        // At this point, the pool has accepted the future, so schedule it for\n+        // execution.\n+\n+        // Create a new task for the future\n+        let task = Task::new2(f, |_| panic!());","path":"tokio-threadpool/src/lib.rs","position":41,"original_position":41,"commit_id":"f9e97f1882d18ec509afef76417bb57a29900128","original_commit_id":"f9e97f1882d18ec509afef76417bb57a29900128","user":{"login":"carllerche","id":6180,"avatar_url":"https://avatars3.githubusercontent.com/u/6180?v=4","gravatar_id":"","url":"https://api.github.com/users/carllerche","html_url":"https://github.com/carllerche","followers_url":"https://api.github.com/users/carllerche/followers","following_url":"https://api.github.com/users/carllerche/following{/other_user}","gists_url":"https://api.github.com/users/carllerche/gists{/gist_id}","starred_url":"https://api.github.com/users/carllerche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carllerche/subscriptions","organizations_url":"https://api.github.com/users/carllerche/orgs","repos_url":"https://api.github.com/users/carllerche/repos","events_url":"https://api.github.com/users/carllerche/events{/privacy}","received_events_url":"https://api.github.com/users/carllerche/received_events","type":"User","site_admin":false},"body":"This probably shouldn't panic?","created_at":"2018-03-08T17:14:44Z","updated_at":"2018-03-08T17:16:21Z","html_url":"https://github.com/tokio-rs/tokio/pull/172#discussion_r173226959","pull_request_url":"https://api.github.com/repos/tokio-rs/tokio/pulls/172","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/tokio-rs/tokio/pulls/comments/173226959"},"html":{"href":"https://github.com/tokio-rs/tokio/pull/172#discussion_r173226959"},"pull_request":{"href":"https://api.github.com/repos/tokio-rs/tokio/pulls/172"}}},"pull_request":{"url":"https://api.github.com/repos/tokio-rs/tokio/pulls/172","id":172637451,"html_url":"https://github.com/tokio-rs/tokio/pull/172","diff_url":"https://github.com/tokio-rs/tokio/pull/172.diff","patch_url":"https://github.com/tokio-rs/tokio/pull/172.patch","issue_url":"https://api.github.com/repos/tokio-rs/tokio/issues/172","number":172,"state":"open","locked":false,"title":"Proof of concept: simultaneous futures compat","user":{"login":"aturon","id":709807,"avatar_url":"https://avatars2.githubusercontent.com/u/709807?v=4","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"body":"I realized that, at least for the reactor (but I think throughout), it's possible to just simultaneously support both versions of the futures crate.\r\n\r\nHere is a proof of concept showing how this is done for the reactor. Note that the `futures2` crate here is a hack until an actual release candidate is published to crates.io. This compiles for me locally.","created_at":"2018-03-03T00:39:15Z","updated_at":"2018-03-08T17:16:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d83a114dea884443710fd0a559b50566cc087fdf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tokio-rs/tokio/pulls/172/commits","review_comments_url":"https://api.github.com/repos/tokio-rs/tokio/pulls/172/comments","review_comment_url":"https://api.github.com/repos/tokio-rs/tokio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tokio-rs/tokio/issues/172/comments","statuses_url":"https://api.github.com/repos/tokio-rs/tokio/statuses/f9e97f1882d18ec509afef76417bb57a29900128","head":{"label":"aturon:futures-0.2","ref":"futures-0.2","sha":"f9e97f1882d18ec509afef76417bb57a29900128","user":{"login":"aturon","id":709807,"avatar_url":"https://avatars2.githubusercontent.com/u/709807?v=4","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"repo":{"id":67946138,"name":"tokio","full_name":"aturon/tokio","owner":{"login":"aturon","id":709807,"avatar_url":"https://avatars2.githubusercontent.com/u/709807?v=4","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aturon/tokio","description":"Asynchronous I/O for Rust","fork":true,"url":"https://api.github.com/repos/aturon/tokio","forks_url":"https://api.github.com/repos/aturon/tokio/forks","keys_url":"https://api.github.com/repos/aturon/tokio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aturon/tokio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aturon/tokio/teams","hooks_url":"https://api.github.com/repos/aturon/tokio/hooks","issue_events_url":"https://api.github.com/repos/aturon/tokio/issues/events{/number}","events_url":"https://api.github.com/repos/aturon/tokio/events","assignees_url":"https://api.github.com/repos/aturon/tokio/assignees{/user}","branches_url":"https://api.github.com/repos/aturon/tokio/branches{/branch}","tags_url":"https://api.github.com/repos/aturon/tokio/tags","blobs_url":"https://api.github.com/repos/aturon/tokio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aturon/tokio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aturon/tokio/git/refs{/sha}","trees_url":"https://api.github.com/repos/aturon/tokio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aturon/tokio/statuses/{sha}","languages_url":"https://api.github.com/repos/aturon/tokio/languages","stargazers_url":"https://api.github.com/repos/aturon/tokio/stargazers","contributors_url":"https://api.github.com/repos/aturon/tokio/contributors","subscribers_url":"https://api.github.com/repos/aturon/tokio/subscribers","subscription_url":"https://api.github.com/repos/aturon/tokio/subscription","commits_url":"https://api.github.com/repos/aturon/tokio/commits{/sha}","git_commits_url":"https://api.github.com/repos/aturon/tokio/git/commits{/sha}","comments_url":"https://api.github.com/repos/aturon/tokio/comments{/number}","issue_comment_url":"https://api.github.com/repos/aturon/tokio/issues/comments{/number}","contents_url":"https://api.github.com/repos/aturon/tokio/contents/{+path}","compare_url":"https://api.github.com/repos/aturon/tokio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aturon/tokio/merges","archive_url":"https://api.github.com/repos/aturon/tokio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aturon/tokio/downloads","issues_url":"https://api.github.com/repos/aturon/tokio/issues{/number}","pulls_url":"https://api.github.com/repos/aturon/tokio/pulls{/number}","milestones_url":"https://api.github.com/repos/aturon/tokio/milestones{/number}","notifications_url":"https://api.github.com/repos/aturon/tokio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aturon/tokio/labels{/name}","releases_url":"https://api.github.com/repos/aturon/tokio/releases{/id}","deployments_url":"https://api.github.com/repos/aturon/tokio/deployments","created_at":"2016-09-11T18:11:41Z","updated_at":"2016-09-11T13:58:15Z","pushed_at":"2018-03-08T00:02:29Z","git_url":"git://github.com/aturon/tokio.git","ssh_url":"git@github.com:aturon/tokio.git","clone_url":"https://github.com/aturon/tokio.git","svn_url":"https://github.com/aturon/tokio","homepage":null,"size":973,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tokio-rs:master","ref":"master","sha":"5555cbc85e48a110f7d7d60ba6af9ec31eb17142","user":{"login":"tokio-rs","id":20248544,"avatar_url":"https://avatars2.githubusercontent.com/u/20248544?v=4","gravatar_id":"","url":"https://api.github.com/users/tokio-rs","html_url":"https://github.com/tokio-rs","followers_url":"https://api.github.com/users/tokio-rs/followers","following_url":"https://api.github.com/users/tokio-rs/following{/other_user}","gists_url":"https://api.github.com/users/tokio-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tokio-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokio-rs/subscriptions","organizations_url":"https://api.github.com/users/tokio-rs/orgs","repos_url":"https://api.github.com/users/tokio-rs/repos","events_url":"https://api.github.com/users/tokio-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tokio-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":67836789,"name":"tokio","full_name":"tokio-rs/tokio","owner":{"login":"tokio-rs","id":20248544,"avatar_url":"https://avatars2.githubusercontent.com/u/20248544?v=4","gravatar_id":"","url":"https://api.github.com/users/tokio-rs","html_url":"https://github.com/tokio-rs","followers_url":"https://api.github.com/users/tokio-rs/followers","following_url":"https://api.github.com/users/tokio-rs/following{/other_user}","gists_url":"https://api.github.com/users/tokio-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/tokio-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokio-rs/subscriptions","organizations_url":"https://api.github.com/users/tokio-rs/orgs","repos_url":"https://api.github.com/users/tokio-rs/repos","events_url":"https://api.github.com/users/tokio-rs/events{/privacy}","received_events_url":"https://api.github.com/users/tokio-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tokio-rs/tokio","description":"A runtime for writing reliable, asynchronous, and slim applications with the Rust programming language.","fork":false,"url":"https://api.github.com/repos/tokio-rs/tokio","forks_url":"https://api.github.com/repos/tokio-rs/tokio/forks","keys_url":"https://api.github.com/repos/tokio-rs/tokio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tokio-rs/tokio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tokio-rs/tokio/teams","hooks_url":"https://api.github.com/repos/tokio-rs/tokio/hooks","issue_events_url":"https://api.github.com/repos/tokio-rs/tokio/issues/events{/number}","events_url":"https://api.github.com/repos/tokio-rs/tokio/events","assignees_url":"https://api.github.com/repos/tokio-rs/tokio/assignees{/user}","branches_url":"https://api.github.com/repos/tokio-rs/tokio/branches{/branch}","tags_url":"https://api.github.com/repos/tokio-rs/tokio/tags","blobs_url":"https://api.github.com/repos/tokio-rs/tokio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tokio-rs/tokio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tokio-rs/tokio/git/refs{/sha}","trees_url":"https://api.github.com/repos/tokio-rs/tokio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tokio-rs/tokio/statuses/{sha}","languages_url":"https://api.github.com/repos/tokio-rs/tokio/languages","stargazers_url":"https://api.github.com/repos/tokio-rs/tokio/stargazers","contributors_url":"https://api.github.com/repos/tokio-rs/tokio/contributors","subscribers_url":"https://api.github.com/repos/tokio-rs/tokio/subscribers","subscription_url":"https://api.github.com/repos/tokio-rs/tokio/subscription","commits_url":"https://api.github.com/repos/tokio-rs/tokio/commits{/sha}","git_commits_url":"https://api.github.com/repos/tokio-rs/tokio/git/commits{/sha}","comments_url":"https://api.github.com/repos/tokio-rs/tokio/comments{/number}","issue_comment_url":"https://api.github.com/repos/tokio-rs/tokio/issues/comments{/number}","contents_url":"https://api.github.com/repos/tokio-rs/tokio/contents/{+path}","compare_url":"https://api.github.com/repos/tokio-rs/tokio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tokio-rs/tokio/merges","archive_url":"https://api.github.com/repos/tokio-rs/tokio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tokio-rs/tokio/downloads","issues_url":"https://api.github.com/repos/tokio-rs/tokio/issues{/number}","pulls_url":"https://api.github.com/repos/tokio-rs/tokio/pulls{/number}","milestones_url":"https://api.github.com/repos/tokio-rs/tokio/milestones{/number}","notifications_url":"https://api.github.com/repos/tokio-rs/tokio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tokio-rs/tokio/labels{/name}","releases_url":"https://api.github.com/repos/tokio-rs/tokio/releases{/id}","deployments_url":"https://api.github.com/repos/tokio-rs/tokio/deployments","created_at":"2016-09-09T22:31:36Z","updated_at":"2018-03-08T16:19:57Z","pushed_at":"2018-03-08T16:53:43Z","git_url":"git://github.com/tokio-rs/tokio.git","ssh_url":"git@github.com:tokio-rs/tokio.git","clone_url":"https://github.com/tokio-rs/tokio.git","svn_url":"https://github.com/tokio-rs/tokio","homepage":"https://tokio.rs","size":2468,"stargazers_count":1239,"watchers_count":1239,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":38,"open_issues":36,"watchers":1239,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tokio-rs/tokio/pulls/172"},"html":{"href":"https://github.com/tokio-rs/tokio/pull/172"},"issue":{"href":"https://api.github.com/repos/tokio-rs/tokio/issues/172"},"comments":{"href":"https://api.github.com/repos/tokio-rs/tokio/issues/172/comments"},"review_comments":{"href":"https://api.github.com/repos/tokio-rs/tokio/pulls/172/comments"},"review_comment":{"href":"https://api.github.com/repos/tokio-rs/tokio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tokio-rs/tokio/pulls/172/commits"},"statuses":{"href":"https://api.github.com/repos/tokio-rs/tokio/statuses/f9e97f1882d18ec509afef76417bb57a29900128"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"carllerche"}}