{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/3438","labels_url":"https://api.github.com/repos/nodejs/node/issues/3438/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/3438/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/3438/events","html_url":"https://github.com/nodejs/node/pull/3438","id":112189649,"number":3438,"title":"doc: more use-cases for promise events","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/doc","name":"doc","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-19T17:04:56Z","updated_at":"2015-10-19T17:12:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/3438","html_url":"https://github.com/nodejs/node/pull/3438","diff_url":"https://github.com/nodejs/node/pull/3438.diff","patch_url":"https://github.com/nodejs/node/pull/3438.patch"},"body":"This adds an example of a semi-common promise pattern that could\r\nresult in false-positive 'unhandledRejection' events, to help motivate\r\nwhy there is a dual 'rejectionHandled' event. I anticipate it being\r\nhelpful to users who encounter 'unhandledRejection' events that do not\r\nstem from obvious typos such as the JSON.pasre example.\r\n\r\nAlso cleans up the promise rejection tracking sample. By using a Set\r\ninstead of array we can get O(1) deletion. And, fixed indentation and\r\nbacktick usage there to align with the rest of the document.\r\n\r\n---\r\n\r\nSupercedes #979. Hopefully things can be more civil this time."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/149284818","html_url":"https://github.com/nodejs/node/pull/3438#issuecomment-149284818","issue_url":"https://api.github.com/repos/nodejs/node/issues/3438","id":149284818,"user":{"login":"Qard","id":205482,"avatar_url":"https://avatars.githubusercontent.com/u/205482?v=3","gravatar_id":"","url":"https://api.github.com/users/Qard","html_url":"https://github.com/Qard","followers_url":"https://api.github.com/users/Qard/followers","following_url":"https://api.github.com/users/Qard/following{/other_user}","gists_url":"https://api.github.com/users/Qard/gists{/gist_id}","starred_url":"https://api.github.com/users/Qard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qard/subscriptions","organizations_url":"https://api.github.com/users/Qard/orgs","repos_url":"https://api.github.com/users/Qard/repos","events_url":"https://api.github.com/users/Qard/events{/privacy}","received_events_url":"https://api.github.com/users/Qard/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T17:12:37Z","updated_at":"2015-10-19T17:12:37Z","body":"I'm fine with merging this, if it better highlights the potentially leaky aspect of the unhandledRejections set and the fact that, at any given time, not all items in unhandledRejections are necessarily in a state that they would *never* be handled.\r\n\r\nAs for my comment on making it a topic doc, I don't think that should be a blocker, but should be something we think about in the future. As yet, the non-reference docs situation is not yet entirely nailed down."}}