{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/165977585","pull_request_review_id":93995896,"id":165977585,"diff_hunk":"@@ -74,7 +69,12 @@ StatWatcher::StatWatcher(Environment* env, Local<Object> wrap)\n \n StatWatcher::~StatWatcher() {\n   Stop();","path":"src/node_stat_watcher.cc","position":15,"original_position":15,"commit_id":"fae83aec26ed0936a8ad03beacf7d63399a601c2","original_commit_id":"fae83aec26ed0936a8ad03beacf7d63399a601c2","user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars0.githubusercontent.com/u/275871?v=4","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"body":"Now that I look at it... calling Stop() here is probably a minor (if harmless) bug as it in turn calls MakeWeak() when the destructor is almost certainly invoked from a weak callback.\r\n\r\nYou didn't introduce it so it's fine to leave it be for now but I figured I'd point it out.","created_at":"2018-02-05T13:56:22Z","updated_at":"2018-02-05T13:56:27Z","html_url":"https://github.com/nodejs/node/pull/18307#discussion_r165977585","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/18307","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/165977585"},"html":{"href":"https://github.com/nodejs/node/pull/18307#discussion_r165977585"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/18307"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/18307","id":164467789,"html_url":"https://github.com/nodejs/node/pull/18307","diff_url":"https://github.com/nodejs/node/pull/18307.diff","patch_url":"https://github.com/nodejs/node/pull/18307.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/18307","number":18307,"state":"open","locked":false,"title":"src: schedule unref immediate for uv_close in destructors","user":{"login":"apapirovski","id":20809,"avatar_url":"https://avatars2.githubusercontent.com/u/20809?v=4","gravatar_id":"","url":"https://api.github.com/users/apapirovski","html_url":"https://github.com/apapirovski","followers_url":"https://api.github.com/users/apapirovski/followers","following_url":"https://api.github.com/users/apapirovski/following{/other_user}","gists_url":"https://api.github.com/users/apapirovski/gists{/gist_id}","starred_url":"https://api.github.com/users/apapirovski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apapirovski/subscriptions","organizations_url":"https://api.github.com/users/apapirovski/orgs","repos_url":"https://api.github.com/users/apapirovski/repos","events_url":"https://api.github.com/users/apapirovski/events{/privacy}","received_events_url":"https://api.github.com/users/apapirovski/received_events","type":"User","site_admin":false},"body":"Calling `uv_close` directly in destructors seems to be problematic as it can bring a loop back alive after `EmitBeforeExit`. The problem is that this only happens sometimes as it depends on GC timing, making the behaviour of these two classes unpredictable.\r\n\r\nThis PR should fix that behaviour and also (I think?) fix the flaky `sequential/test-async-wrap-getasyncid.js` test.\r\n\r\nFixes: https://github.com/nodejs/node/issues/18190\r\n\r\n<!--\r\nThank you for your pull request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nBug fixes and new features should include tests and possibly benchmarks.\r\n\r\nContributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [x] 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\nsrc","created_at":"2018-01-23T02:26:39Z","updated_at":"2018-02-05T13:56:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a9f920d1e22570f521bad092b6fc06698724592","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/18307/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/18307/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/18307/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/fae83aec26ed0936a8ad03beacf7d63399a601c2","head":{"label":"apapirovski:fix-cares-wrap-wake-up-loop","ref":"fix-cares-wrap-wake-up-loop","sha":"fae83aec26ed0936a8ad03beacf7d63399a601c2","user":{"login":"apapirovski","id":20809,"avatar_url":"https://avatars2.githubusercontent.com/u/20809?v=4","gravatar_id":"","url":"https://api.github.com/users/apapirovski","html_url":"https://github.com/apapirovski","followers_url":"https://api.github.com/users/apapirovski/followers","following_url":"https://api.github.com/users/apapirovski/following{/other_user}","gists_url":"https://api.github.com/users/apapirovski/gists{/gist_id}","starred_url":"https://api.github.com/users/apapirovski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apapirovski/subscriptions","organizations_url":"https://api.github.com/users/apapirovski/orgs","repos_url":"https://api.github.com/users/apapirovski/repos","events_url":"https://api.github.com/users/apapirovski/events{/privacy}","received_events_url":"https://api.github.com/users/apapirovski/received_events","type":"User","site_admin":false},"repo":{"id":101416741,"name":"node","full_name":"apapirovski/node","owner":{"login":"apapirovski","id":20809,"avatar_url":"https://avatars2.githubusercontent.com/u/20809?v=4","gravatar_id":"","url":"https://api.github.com/users/apapirovski","html_url":"https://github.com/apapirovski","followers_url":"https://api.github.com/users/apapirovski/followers","following_url":"https://api.github.com/users/apapirovski/following{/other_user}","gists_url":"https://api.github.com/users/apapirovski/gists{/gist_id}","starred_url":"https://api.github.com/users/apapirovski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apapirovski/subscriptions","organizations_url":"https://api.github.com/users/apapirovski/orgs","repos_url":"https://api.github.com/users/apapirovski/repos","events_url":"https://api.github.com/users/apapirovski/events{/privacy}","received_events_url":"https://api.github.com/users/apapirovski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/apapirovski/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/apapirovski/node","forks_url":"https://api.github.com/repos/apapirovski/node/forks","keys_url":"https://api.github.com/repos/apapirovski/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apapirovski/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apapirovski/node/teams","hooks_url":"https://api.github.com/repos/apapirovski/node/hooks","issue_events_url":"https://api.github.com/repos/apapirovski/node/issues/events{/number}","events_url":"https://api.github.com/repos/apapirovski/node/events","assignees_url":"https://api.github.com/repos/apapirovski/node/assignees{/user}","branches_url":"https://api.github.com/repos/apapirovski/node/branches{/branch}","tags_url":"https://api.github.com/repos/apapirovski/node/tags","blobs_url":"https://api.github.com/repos/apapirovski/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apapirovski/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apapirovski/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/apapirovski/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apapirovski/node/statuses/{sha}","languages_url":"https://api.github.com/repos/apapirovski/node/languages","stargazers_url":"https://api.github.com/repos/apapirovski/node/stargazers","contributors_url":"https://api.github.com/repos/apapirovski/node/contributors","subscribers_url":"https://api.github.com/repos/apapirovski/node/subscribers","subscription_url":"https://api.github.com/repos/apapirovski/node/subscription","commits_url":"https://api.github.com/repos/apapirovski/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/apapirovski/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/apapirovski/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/apapirovski/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/apapirovski/node/contents/{+path}","compare_url":"https://api.github.com/repos/apapirovski/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apapirovski/node/merges","archive_url":"https://api.github.com/repos/apapirovski/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apapirovski/node/downloads","issues_url":"https://api.github.com/repos/apapirovski/node/issues{/number}","pulls_url":"https://api.github.com/repos/apapirovski/node/pulls{/number}","milestones_url":"https://api.github.com/repos/apapirovski/node/milestones{/number}","notifications_url":"https://api.github.com/repos/apapirovski/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apapirovski/node/labels{/name}","releases_url":"https://api.github.com/repos/apapirovski/node/releases{/id}","deployments_url":"https://api.github.com/repos/apapirovski/node/deployments","created_at":"2017-08-25T15:22:54Z","updated_at":"2017-08-25T15:23:34Z","pushed_at":"2018-02-04T22:00:57Z","git_url":"git://github.com/apapirovski/node.git","ssh_url":"git@github.com:apapirovski/node.git","clone_url":"https://github.com/apapirovski/node.git","svn_url":"https://github.com/apapirovski/node","homepage":"https://nodejs.org","size":342907,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"082f9525d92532867bc7172acebdf9b89a715dab","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","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://avatars3.githubusercontent.com/u/9950313?v=4","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":"2018-02-05T13:46:11Z","pushed_at":"2018-02-05T13:02:12Z","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":350846,"stargazers_count":45214,"watchers_count":45214,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9470,"mirror_url":null,"archived":false,"open_issues_count":793,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":9470,"open_issues":793,"watchers":45214,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/18307"},"html":{"href":"https://github.com/nodejs/node/pull/18307"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/18307"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/18307/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/18307/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/18307/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/fae83aec26ed0936a8ad03beacf7d63399a601c2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bnoordhuis"}}