{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/118972571","pull_request_review_id":40812850,"id":118972571,"diff_hunk":"@@ -0,0 +1,677 @@\n+# Async Hooks\n+\n+> Stability: 1 - Experimental\n+\n+The `async-hooks` module provides an API to register callbacks tracking the\n+lifetime of asynchronous resources created inside a Node.js application.\n+It can be accessed using `require('async-hooks')`.\n+\n+## Terminology\n+\n+An async resource represents either a _handle_ or a _request_.\n+\n+Handles are a reference to a system resource. Some resources are a simple\n+identifier. For example, file system handles are represented by a file\n+descriptor. Other handles are represented by libuv as a platform abstracted\n+struct, e.g. `uv_tcp_t`. Each handle can be continually reused to access and\n+operate on the referenced resource.\n+\n+Requests are short lived data structures created to accomplish one task. The\n+callback for a request should always and only ever fire one time. Which is when\n+the assigned task has either completed or encountered an error. Requests are\n+used by handles to perform tasks such as accepting a new connection or\n+writing data to disk.\n+","path":"doc/api/async_hooks.md","position":24,"original_position":24,"commit_id":"6cce6d2edc4fda14cf12a834f67026e10249f4a1","original_commit_id":"6cce6d2edc4fda14cf12a834f67026e10249f4a1","user":{"login":"AndreasMadsen","id":505333,"avatar_url":"https://avatars3.githubusercontent.com/u/505333?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreasMadsen","html_url":"https://github.com/AndreasMadsen","followers_url":"https://api.github.com/users/AndreasMadsen/followers","following_url":"https://api.github.com/users/AndreasMadsen/following{/other_user}","gists_url":"https://api.github.com/users/AndreasMadsen/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreasMadsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreasMadsen/subscriptions","organizations_url":"https://api.github.com/users/AndreasMadsen/orgs","repos_url":"https://api.github.com/users/AndreasMadsen/repos","events_url":"https://api.github.com/users/AndreasMadsen/events{/privacy}","received_events_url":"https://api.github.com/users/AndreasMadsen/received_events","type":"User","site_admin":false},"body":"It doesn't relate, in fact, it abstracts the two cases into the resource concept.","created_at":"2017-05-29T18:12:29Z","updated_at":"2017-05-29T18:12:29Z","html_url":"https://github.com/nodejs/node/pull/12953#discussion_r118972571","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/12953","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/118972571"},"html":{"href":"https://github.com/nodejs/node/pull/12953#discussion_r118972571"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/12953"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/12953","id":119980646,"html_url":"https://github.com/nodejs/node/pull/12953","diff_url":"https://github.com/nodejs/node/pull/12953.diff","patch_url":"https://github.com/nodejs/node/pull/12953.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/12953","number":12953,"state":"open","locked":false,"title":"docs: documenting async hooks features","user":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars3.githubusercontent.com/u/192891?v=3","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"body":"Continuation of [ongoing PR](https://github.com/thlorenz/node/pull/2) to add documentation for the async hooks feature which was [merged recently](https://github.com/nodejs/node/pull/12892).\r\n\r\nThe existing commits in the previous PR have been cherry-picked onto latest master.\r\nI suggest to work out all nits and finally squash this into one proper commit.\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n-  [x] documentation is changed or added\r\n- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#commit-message-guidelines)\r\n\r\n##### Affected core subsystem(s)\r\n<!-- Provide affected core subsystem(s) (like doc, cluster, crypto, etc). -->\r\n\r\n- async hooks\r\n- docs\r\n","created_at":"2017-05-10T21:17:36Z","updated_at":"2017-05-29T18:12:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac8d426aa89e9fa810a5d0839d2b63d88e7b88c1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Fishrock123","id":1093990,"avatar_url":"https://avatars3.githubusercontent.com/u/1093990?v=3","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/12953/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/12953/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/12953/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/6cce6d2edc4fda14cf12a834f67026e10249f4a1","head":{"label":"thlorenz:thlorenz/async-hooks-docs","ref":"thlorenz/async-hooks-docs","sha":"6cce6d2edc4fda14cf12a834f67026e10249f4a1","user":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars3.githubusercontent.com/u/192891?v=3","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"repo":{"id":53513524,"name":"node","full_name":"thlorenz/node","owner":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars3.githubusercontent.com/u/192891?v=3","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thlorenz/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/thlorenz/node","forks_url":"https://api.github.com/repos/thlorenz/node/forks","keys_url":"https://api.github.com/repos/thlorenz/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thlorenz/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thlorenz/node/teams","hooks_url":"https://api.github.com/repos/thlorenz/node/hooks","issue_events_url":"https://api.github.com/repos/thlorenz/node/issues/events{/number}","events_url":"https://api.github.com/repos/thlorenz/node/events","assignees_url":"https://api.github.com/repos/thlorenz/node/assignees{/user}","branches_url":"https://api.github.com/repos/thlorenz/node/branches{/branch}","tags_url":"https://api.github.com/repos/thlorenz/node/tags","blobs_url":"https://api.github.com/repos/thlorenz/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thlorenz/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thlorenz/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/thlorenz/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thlorenz/node/statuses/{sha}","languages_url":"https://api.github.com/repos/thlorenz/node/languages","stargazers_url":"https://api.github.com/repos/thlorenz/node/stargazers","contributors_url":"https://api.github.com/repos/thlorenz/node/contributors","subscribers_url":"https://api.github.com/repos/thlorenz/node/subscribers","subscription_url":"https://api.github.com/repos/thlorenz/node/subscription","commits_url":"https://api.github.com/repos/thlorenz/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/thlorenz/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/thlorenz/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/thlorenz/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/thlorenz/node/contents/{+path}","compare_url":"https://api.github.com/repos/thlorenz/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thlorenz/node/merges","archive_url":"https://api.github.com/repos/thlorenz/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thlorenz/node/downloads","issues_url":"https://api.github.com/repos/thlorenz/node/issues{/number}","pulls_url":"https://api.github.com/repos/thlorenz/node/pulls{/number}","milestones_url":"https://api.github.com/repos/thlorenz/node/milestones{/number}","notifications_url":"https://api.github.com/repos/thlorenz/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thlorenz/node/labels{/name}","releases_url":"https://api.github.com/repos/thlorenz/node/releases{/id}","deployments_url":"https://api.github.com/repos/thlorenz/node/deployments","created_at":"2016-03-09T16:33:44Z","updated_at":"2016-12-23T17:15:45Z","pushed_at":"2017-05-18T16:50:24Z","git_url":"git://github.com/thlorenz/node.git","ssh_url":"git@github.com:thlorenz/node.git","clone_url":"https://github.com/thlorenz/node.git","svn_url":"https://github.com/thlorenz/node","homepage":"https://nodejs.org","size":266613,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"234353a1b81a474ef93e1039afc2441ca81810d5","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars0.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars0.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2017-05-29T16:14:23Z","pushed_at":"2017-05-29T17:49:19Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":290232,"stargazers_count":35354,"watchers_count":35354,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6805,"mirror_url":null,"open_issues_count":994,"forks":6805,"open_issues":994,"watchers":35354,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/12953"},"html":{"href":"https://github.com/nodejs/node/pull/12953"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/12953"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/12953/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/12953/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/12953/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/6cce6d2edc4fda14cf12a834f67026e10249f4a1"}}}}
{"actor":{"display_login":"AndreasMadsen"}}