{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/48676846","id":48676846,"diff_hunk":"@@ -338,13 +341,17 @@ defmodule Task do\n   end\n \n   @doc \"\"\"\n-  Receives a group of tasks and a message and finds\n+  Takes a list of tasks and a message and finds\n   a task that matches the given message.\n \n-  This function returns a tuple with the returned value\n-  in case the message matches a task that exited with\n-  success alongside the matching task. It returns `nil`\n-  if no task was found. It exits if the task has failed.\n+  If the message matches a task that finished normally,\n+  this function returns a tuple with the task's\n+  result and `Task` struct.\n+\n+  If the message matches a task that terminated before\n+  sending its result back, this function will exit.","path":"lib/elixir/lib/task.ex","position":255,"original_position":255,"commit_id":"cb165a87774634e9e87ce089f1f9a7229138d2a8","original_commit_id":"cb165a87774634e9e87ce089f1f9a7229138d2a8","user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"body":"When `Task.find` was introduced, we didn't have `async_nolink` and changing it would be backwards incompatible. We were also not sure if the `Task.find` would stick. Today, there are two ways of using tasks:\r\n\r\n1. You want it to compute something in asynchronously and you want it to go until the end (async + await)\r\n\r\n2. You want to start some computation that you may not necessarily want to wait until it finishes (async + yield + shutdown)\r\n\r\nAt this point, I am actually wondering if we shouldn't just kill `Task.find`. If you have a server, you can easily use `Task.start_link` and send a message back. Today, the task message format is documented and unlikely to change, so you can also check for it explicitly.\r\n\r\nThoughts? Of course, it would have to be on 1.3.","created_at":"2016-01-01T09:14:19Z","updated_at":"2016-01-01T09:14:19Z","html_url":"https://github.com/elixir-lang/elixir/pull/4128#discussion_r48676846","pull_request_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/48676846"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/4128#discussion_r48676846"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128"}}},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128","id":54790841,"html_url":"https://github.com/elixir-lang/elixir/pull/4128","diff_url":"https://github.com/elixir-lang/elixir/pull/4128.diff","patch_url":"https://github.com/elixir-lang/elixir/pull/4128.patch","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4128","number":4128,"state":"open","locked":false,"title":"Multiple small fixes in the Task and Task.Supervisor docs.","user":{"login":"alco","id":207748,"avatar_url":"https://avatars.githubusercontent.com/u/207748?v=3","gravatar_id":"","url":"https://api.github.com/users/alco","html_url":"https://github.com/alco","followers_url":"https://api.github.com/users/alco/followers","following_url":"https://api.github.com/users/alco/following{/other_user}","gists_url":"https://api.github.com/users/alco/gists{/gist_id}","starred_url":"https://api.github.com/users/alco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alco/subscriptions","organizations_url":"https://api.github.com/users/alco/orgs","repos_url":"https://api.github.com/users/alco/repos","events_url":"https://api.github.com/users/alco/events{/privacy}","received_events_url":"https://api.github.com/users/alco/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-30T10:35:21Z","updated_at":"2016-01-01T09:14:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6907d106b750a6c8936de7e89ed123cfbd92c268","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4128/comments","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/cb165a87774634e9e87ce089f1f9a7229138d2a8","head":{"label":"alco:alco/task-doc-improvements","ref":"alco/task-doc-improvements","sha":"cb165a87774634e9e87ce089f1f9a7229138d2a8","user":{"login":"alco","id":207748,"avatar_url":"https://avatars.githubusercontent.com/u/207748?v=3","gravatar_id":"","url":"https://api.github.com/users/alco","html_url":"https://github.com/alco","followers_url":"https://api.github.com/users/alco/followers","following_url":"https://api.github.com/users/alco/following{/other_user}","gists_url":"https://api.github.com/users/alco/gists{/gist_id}","starred_url":"https://api.github.com/users/alco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alco/subscriptions","organizations_url":"https://api.github.com/users/alco/orgs","repos_url":"https://api.github.com/users/alco/repos","events_url":"https://api.github.com/users/alco/events{/privacy}","received_events_url":"https://api.github.com/users/alco/received_events","type":"User","site_admin":false},"repo":{"id":3815790,"name":"elixir","full_name":"alco/elixir","owner":{"login":"alco","id":207748,"avatar_url":"https://avatars.githubusercontent.com/u/207748?v=3","gravatar_id":"","url":"https://api.github.com/users/alco","html_url":"https://github.com/alco","followers_url":"https://api.github.com/users/alco/followers","following_url":"https://api.github.com/users/alco/following{/other_user}","gists_url":"https://api.github.com/users/alco/gists{/gist_id}","starred_url":"https://api.github.com/users/alco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alco/subscriptions","organizations_url":"https://api.github.com/users/alco/orgs","repos_url":"https://api.github.com/users/alco/repos","events_url":"https://api.github.com/users/alco/events{/privacy}","received_events_url":"https://api.github.com/users/alco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alco/elixir","description":"A modern approach to programming for the Erlang VM","fork":true,"url":"https://api.github.com/repos/alco/elixir","forks_url":"https://api.github.com/repos/alco/elixir/forks","keys_url":"https://api.github.com/repos/alco/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alco/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alco/elixir/teams","hooks_url":"https://api.github.com/repos/alco/elixir/hooks","issue_events_url":"https://api.github.com/repos/alco/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/alco/elixir/events","assignees_url":"https://api.github.com/repos/alco/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/alco/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/alco/elixir/tags","blobs_url":"https://api.github.com/repos/alco/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alco/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alco/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/alco/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alco/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/alco/elixir/languages","stargazers_url":"https://api.github.com/repos/alco/elixir/stargazers","contributors_url":"https://api.github.com/repos/alco/elixir/contributors","subscribers_url":"https://api.github.com/repos/alco/elixir/subscribers","subscription_url":"https://api.github.com/repos/alco/elixir/subscription","commits_url":"https://api.github.com/repos/alco/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/alco/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/alco/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/alco/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/alco/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/alco/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alco/elixir/merges","archive_url":"https://api.github.com/repos/alco/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alco/elixir/downloads","issues_url":"https://api.github.com/repos/alco/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/alco/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/alco/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/alco/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alco/elixir/labels{/name}","releases_url":"https://api.github.com/repos/alco/elixir/releases{/id}","created_at":"2012-03-24T07:48:47Z","updated_at":"2015-12-22T02:46:37Z","pushed_at":"2015-12-31T19:52:14Z","git_url":"git://github.com/alco/elixir.git","ssh_url":"git@github.com:alco/elixir.git","clone_url":"https://github.com/alco/elixir.git","svn_url":"https://github.com/alco/elixir","homepage":"http://elixir-lang.org/","size":32844,"stargazers_count":17,"watchers_count":17,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":17,"default_branch":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"65ec10839941065f77aa21f9639e1ac65dcd0709","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","created_at":"2011-01-09T08:43:57Z","updated_at":"2016-01-01T03:57:02Z","pushed_at":"2015-12-31T19:52:14Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":40981,"stargazers_count":5745,"watchers_count":5745,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":800,"mirror_url":null,"open_issues_count":42,"forks":800,"open_issues":42,"watchers":5745,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/4128"},"issue":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/4128"},"comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/4128/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/4128/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/elixir/statuses/cb165a87774634e9e87ce089f1f9a7229138d2a8"}}}}