{"action":"created","comment":{"url":"https://api.github.com/repos/rstudio/pool/pulls/comments/70566903","id":70566903,"diff_hunk":"@@ -45,118 +53,178 @@ Pool <- R6Class(\"Pool\",\n       }\n       reg.finalizer(self,\n         function(self) {\n-          protectDefaultScheduler({\n-            freeEnv <- private$freeObjects\n-            if (length(freeEnv) > 0) {\n-              self$close()\n-            }\n-          })\n+          if (self$valid) {\n+            warning(\"Closing leaked pool.\")\n+            self$close()\n+          }\n         },\n         onexit = TRUE)","path":"R/pool.R","position":55,"original_position":55,"commit_id":"e0a1c6a6621dbf1433c126be4841307530151230","original_commit_id":"e0a1c6a6621dbf1433c126be4841307530151230","user":{"login":"jcheng5","id":129551,"avatar_url":"https://avatars.githubusercontent.com/u/129551?v=3","gravatar_id":"","url":"https://api.github.com/users/jcheng5","html_url":"https://github.com/jcheng5","followers_url":"https://api.github.com/users/jcheng5/followers","following_url":"https://api.github.com/users/jcheng5/following{/other_user}","gists_url":"https://api.github.com/users/jcheng5/gists{/gist_id}","starred_url":"https://api.github.com/users/jcheng5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcheng5/subscriptions","organizations_url":"https://api.github.com/users/jcheng5/orgs","repos_url":"https://api.github.com/users/jcheng5/repos","events_url":"https://api.github.com/users/jcheng5/events{/privacy}","received_events_url":"https://api.github.com/users/jcheng5/received_events","type":"User","site_admin":false},"body":"Hmmm, maybe our finalizers should have `onexit = FALSE`. I can't decide which is worse: trying to exit an R process and waiting on DB connections to close, or exiting without cleaning up some kind of external state. Thoughts?","created_at":"2016-07-13T05:44:11Z","updated_at":"2016-07-13T05:44:11Z","html_url":"https://github.com/rstudio/pool/pull/11#discussion_r70566903","pull_request_url":"https://api.github.com/repos/rstudio/pool/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/rstudio/pool/pulls/comments/70566903"},"html":{"href":"https://github.com/rstudio/pool/pull/11#discussion_r70566903"},"pull_request":{"href":"https://api.github.com/repos/rstudio/pool/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/rstudio/pool/pulls/11","id":77150177,"html_url":"https://github.com/rstudio/pool/pull/11","diff_url":"https://github.com/rstudio/pool/pull/11.diff","patch_url":"https://github.com/rstudio/pool/pull/11.patch","issue_url":"https://api.github.com/repos/rstudio/pool/issues/11","number":11,"state":"open","locked":false,"title":"Error handling","user":{"login":"bborgesr","id":6527540,"avatar_url":"https://avatars.githubusercontent.com/u/6527540?v=3","gravatar_id":"","url":"https://api.github.com/users/bborgesr","html_url":"https://github.com/bborgesr","followers_url":"https://api.github.com/users/bborgesr/followers","following_url":"https://api.github.com/users/bborgesr/following{/other_user}","gists_url":"https://api.github.com/users/bborgesr/gists{/gist_id}","starred_url":"https://api.github.com/users/bborgesr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bborgesr/subscriptions","organizations_url":"https://api.github.com/users/bborgesr/orgs","repos_url":"https://api.github.com/users/bborgesr/repos","events_url":"https://api.github.com/users/bborgesr/events{/privacy}","received_events_url":"https://api.github.com/users/bborgesr/received_events","type":"User","site_admin":false},"body":"[not ready to merge]\r\n\r\n@jcheng5: Things are mostly working, but I'm still figuring out out the clear up recurring tasks so that objects can be garbage collected. Apart from that, I think we're good. So I decided to go ahead and open the PR so you can start having a look if you want.\r\n\r\nPS: the Travis build is failing because of some minor documentation things. I'll take care of that.","created_at":"2016-07-12T16:40:48Z","updated_at":"2016-07-13T05:44:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fab44e723d917847af74cacced9d9514c95c6d58","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rstudio/pool/pulls/11/commits","review_comments_url":"https://api.github.com/repos/rstudio/pool/pulls/11/comments","review_comment_url":"https://api.github.com/repos/rstudio/pool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rstudio/pool/issues/11/comments","statuses_url":"https://api.github.com/repos/rstudio/pool/statuses/e0a1c6a6621dbf1433c126be4841307530151230","head":{"label":"rstudio:error-handling","ref":"error-handling","sha":"e0a1c6a6621dbf1433c126be4841307530151230","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":59137493,"name":"pool","full_name":"rstudio/pool","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/pool","description":"","fork":false,"url":"https://api.github.com/repos/rstudio/pool","forks_url":"https://api.github.com/repos/rstudio/pool/forks","keys_url":"https://api.github.com/repos/rstudio/pool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/pool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/pool/teams","hooks_url":"https://api.github.com/repos/rstudio/pool/hooks","issue_events_url":"https://api.github.com/repos/rstudio/pool/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/pool/events","assignees_url":"https://api.github.com/repos/rstudio/pool/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/pool/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/pool/tags","blobs_url":"https://api.github.com/repos/rstudio/pool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/pool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/pool/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/pool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/pool/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/pool/languages","stargazers_url":"https://api.github.com/repos/rstudio/pool/stargazers","contributors_url":"https://api.github.com/repos/rstudio/pool/contributors","subscribers_url":"https://api.github.com/repos/rstudio/pool/subscribers","subscription_url":"https://api.github.com/repos/rstudio/pool/subscription","commits_url":"https://api.github.com/repos/rstudio/pool/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/pool/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/pool/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/pool/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/pool/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/pool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/pool/merges","archive_url":"https://api.github.com/repos/rstudio/pool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/pool/downloads","issues_url":"https://api.github.com/repos/rstudio/pool/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/pool/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/pool/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/pool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/pool/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/pool/releases{/id}","deployments_url":"https://api.github.com/repos/rstudio/pool/deployments","created_at":"2016-05-18T17:33:18Z","updated_at":"2016-07-01T23:59:31Z","pushed_at":"2016-07-13T04:38:26Z","git_url":"git://github.com/rstudio/pool.git","ssh_url":"git@github.com:rstudio/pool.git","clone_url":"https://github.com/rstudio/pool.git","svn_url":"https://github.com/rstudio/pool","homepage":null,"size":103,"stargazers_count":7,"watchers_count":7,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":7,"default_branch":"master"}},"base":{"label":"rstudio:master","ref":"master","sha":"45d844fac1f6065d8d8b6973cfb29e633a3d3142","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":59137493,"name":"pool","full_name":"rstudio/pool","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/pool","description":"","fork":false,"url":"https://api.github.com/repos/rstudio/pool","forks_url":"https://api.github.com/repos/rstudio/pool/forks","keys_url":"https://api.github.com/repos/rstudio/pool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/pool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/pool/teams","hooks_url":"https://api.github.com/repos/rstudio/pool/hooks","issue_events_url":"https://api.github.com/repos/rstudio/pool/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/pool/events","assignees_url":"https://api.github.com/repos/rstudio/pool/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/pool/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/pool/tags","blobs_url":"https://api.github.com/repos/rstudio/pool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/pool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/pool/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/pool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/pool/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/pool/languages","stargazers_url":"https://api.github.com/repos/rstudio/pool/stargazers","contributors_url":"https://api.github.com/repos/rstudio/pool/contributors","subscribers_url":"https://api.github.com/repos/rstudio/pool/subscribers","subscription_url":"https://api.github.com/repos/rstudio/pool/subscription","commits_url":"https://api.github.com/repos/rstudio/pool/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/pool/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/pool/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/pool/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/pool/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/pool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/pool/merges","archive_url":"https://api.github.com/repos/rstudio/pool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/pool/downloads","issues_url":"https://api.github.com/repos/rstudio/pool/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/pool/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/pool/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/pool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/pool/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/pool/releases{/id}","deployments_url":"https://api.github.com/repos/rstudio/pool/deployments","created_at":"2016-05-18T17:33:18Z","updated_at":"2016-07-01T23:59:31Z","pushed_at":"2016-07-13T04:38:26Z","git_url":"git://github.com/rstudio/pool.git","ssh_url":"git@github.com:rstudio/pool.git","clone_url":"https://github.com/rstudio/pool.git","svn_url":"https://github.com/rstudio/pool","homepage":null,"size":103,"stargazers_count":7,"watchers_count":7,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rstudio/pool/pulls/11"},"html":{"href":"https://github.com/rstudio/pool/pull/11"},"issue":{"href":"https://api.github.com/repos/rstudio/pool/issues/11"},"comments":{"href":"https://api.github.com/repos/rstudio/pool/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/rstudio/pool/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/rstudio/pool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rstudio/pool/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/rstudio/pool/statuses/e0a1c6a6621dbf1433c126be4841307530151230"}}}}
{"actor":{"display_login":"jcheng5"}}