{"action":"created","comment":{"url":"https://api.github.com/repos/tgoodlet/tractor/pulls/comments/206315643","pull_request_review_id":141699797,"id":206315643,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjMxNTY0Mw==","diff_hunk":"@@ -53,9 +57,34 @@ def __init__(self, actor, supervisor=None):\n         )\n         parent_addr = self._actor.accept_addr\n         assert parent_addr\n+        self._forkserver = fs = forkserver._forkserver\n+        if mp.current_process().name == 'MainProcess' and (\n+            not self._actor._forkserver_info\n+        ):\n+            # if we're the \"main\" process start the forkserver only once\n+            # and pass it's ipc info to downstream children\n+\n+            # forkserver.set_forkserver_preload(rpc_module_paths)\n+            forkserver.ensure_running()\n+            fs_info = addr, alive_fd, pid, st_pid, st_fd = (\n+                fs._forkserver_address,\n+                fs._forkserver_alive_fd,\n+                getattr(fs, '_forkserver_pid', None),\n+                getattr(semaphore_tracker._semaphore_tracker, '_pid', None),\n+                semaphore_tracker._semaphore_tracker._fd,\n+            )\n+        else:\n+            fs_info = (\n+                fs._forkserver_address,\n+                fs._forkserver_alive_fd,\n+                fs._forkserver_pid,\n+                semaphore_tracker._semaphore_tracker._pid,\n+                semaphore_tracker._semaphore_tracker._fd,\n+             ) = self._actor._forkserver_info","path":"tractor/_trionics.py","position":55,"original_position":55,"commit_id":"cd17e29f6e05cf63acdc31dcf8631ab5ca4678db","original_commit_id":"cd17e29f6e05cf63acdc31dcf8631ab5ca4678db","user":{"login":"vodik","id":216803,"node_id":"MDQ6VXNlcjIxNjgwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/216803?v=4","gravatar_id":"","url":"https://api.github.com/users/vodik","html_url":"https://github.com/vodik","followers_url":"https://api.github.com/users/vodik/followers","following_url":"https://api.github.com/users/vodik/following{/other_user}","gists_url":"https://api.github.com/users/vodik/gists{/gist_id}","starred_url":"https://api.github.com/users/vodik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vodik/subscriptions","organizations_url":"https://api.github.com/users/vodik/orgs","repos_url":"https://api.github.com/users/vodik/repos","events_url":"https://api.github.com/users/vodik/events{/privacy}","received_events_url":"https://api.github.com/users/vodik/received_events","type":"User","site_admin":false},"body":"These two assignments are kinda tricky: you're building a tuple, unpacking tuples two different ways, while also chaining assignment. Its clever, but maybe borderline not readable?\r\n\r\nAt the very least, I could see someone assuming these two statements as similar - as they're written to look parallel - but they're not. The dominating block of the top constructs a tuple, while its unpacking one in the bottom. That last assignment could be visually easy to overlook.\r\n\r\nPersonal rule of thumb (imho) - the further you get to the end of a line, the less important the details should be.\r\n\r\nI'd consider rewriting this, even if it makes it more verbose - but I don't necessarily consider this an egregiously offense either.","created_at":"2018-07-30T20:46:44Z","updated_at":"2018-07-30T20:49:32Z","html_url":"https://github.com/tgoodlet/tractor/pull/21#discussion_r206315643","pull_request_url":"https://api.github.com/repos/tgoodlet/tractor/pulls/21","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tgoodlet/tractor/pulls/comments/206315643"},"html":{"href":"https://github.com/tgoodlet/tractor/pull/21#discussion_r206315643"},"pull_request":{"href":"https://api.github.com/repos/tgoodlet/tractor/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/tgoodlet/tractor/pulls/21","id":203723466,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNzIzNDY2","html_url":"https://github.com/tgoodlet/tractor/pull/21","diff_url":"https://github.com/tgoodlet/tractor/pull/21.diff","patch_url":"https://github.com/tgoodlet/tractor/pull/21.patch","issue_url":"https://api.github.com/repos/tgoodlet/tractor/issues/21","number":21,"state":"open","locked":false,"title":"Forkserver singleton","user":{"login":"tgoodlet","id":291685,"node_id":"MDQ6VXNlcjI5MTY4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291685?v=4","gravatar_id":"","url":"https://api.github.com/users/tgoodlet","html_url":"https://github.com/tgoodlet","followers_url":"https://api.github.com/users/tgoodlet/followers","following_url":"https://api.github.com/users/tgoodlet/following{/other_user}","gists_url":"https://api.github.com/users/tgoodlet/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoodlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoodlet/subscriptions","organizations_url":"https://api.github.com/users/tgoodlet/orgs","repos_url":"https://api.github.com/users/tgoodlet/repos","events_url":"https://api.github.com/users/tgoodlet/events{/privacy}","received_events_url":"https://api.github.com/users/tgoodlet/received_events","type":"User","site_admin":false},"body":"Temporary solution for #6 by overriding some stdlib code in `multiprocessing.forkserver.py`.\r\nA proper patch should be made eventually to get this more granular server management into the stdlib. For more detailed discussion see #20.\r\n\r\n@vodik ping ping!","created_at":"2018-07-25T05:16:06Z","updated_at":"2018-07-30T20:49:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06d2088424447ceff5473bddcbe019ae47586f0f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tgoodlet/tractor/pulls/21/commits","review_comments_url":"https://api.github.com/repos/tgoodlet/tractor/pulls/21/comments","review_comment_url":"https://api.github.com/repos/tgoodlet/tractor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgoodlet/tractor/issues/21/comments","statuses_url":"https://api.github.com/repos/tgoodlet/tractor/statuses/cd17e29f6e05cf63acdc31dcf8631ab5ca4678db","head":{"label":"tgoodlet:forkserver_singleton","ref":"forkserver_singleton","sha":"cd17e29f6e05cf63acdc31dcf8631ab5ca4678db","user":{"login":"tgoodlet","id":291685,"node_id":"MDQ6VXNlcjI5MTY4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291685?v=4","gravatar_id":"","url":"https://api.github.com/users/tgoodlet","html_url":"https://github.com/tgoodlet","followers_url":"https://api.github.com/users/tgoodlet/followers","following_url":"https://api.github.com/users/tgoodlet/following{/other_user}","gists_url":"https://api.github.com/users/tgoodlet/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoodlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoodlet/subscriptions","organizations_url":"https://api.github.com/users/tgoodlet/orgs","repos_url":"https://api.github.com/users/tgoodlet/repos","events_url":"https://api.github.com/users/tgoodlet/events{/privacy}","received_events_url":"https://api.github.com/users/tgoodlet/received_events","type":"User","site_admin":false},"repo":{"id":139894740,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4OTQ3NDA=","name":"tractor","full_name":"tgoodlet/tractor","owner":{"login":"tgoodlet","id":291685,"node_id":"MDQ6VXNlcjI5MTY4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291685?v=4","gravatar_id":"","url":"https://api.github.com/users/tgoodlet","html_url":"https://github.com/tgoodlet","followers_url":"https://api.github.com/users/tgoodlet/followers","following_url":"https://api.github.com/users/tgoodlet/following{/other_user}","gists_url":"https://api.github.com/users/tgoodlet/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoodlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoodlet/subscriptions","organizations_url":"https://api.github.com/users/tgoodlet/orgs","repos_url":"https://api.github.com/users/tgoodlet/repos","events_url":"https://api.github.com/users/tgoodlet/events{/privacy}","received_events_url":"https://api.github.com/users/tgoodlet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tgoodlet/tractor","description":"An async-native actor model built on trio","fork":false,"url":"https://api.github.com/repos/tgoodlet/tractor","forks_url":"https://api.github.com/repos/tgoodlet/tractor/forks","keys_url":"https://api.github.com/repos/tgoodlet/tractor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgoodlet/tractor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgoodlet/tractor/teams","hooks_url":"https://api.github.com/repos/tgoodlet/tractor/hooks","issue_events_url":"https://api.github.com/repos/tgoodlet/tractor/issues/events{/number}","events_url":"https://api.github.com/repos/tgoodlet/tractor/events","assignees_url":"https://api.github.com/repos/tgoodlet/tractor/assignees{/user}","branches_url":"https://api.github.com/repos/tgoodlet/tractor/branches{/branch}","tags_url":"https://api.github.com/repos/tgoodlet/tractor/tags","blobs_url":"https://api.github.com/repos/tgoodlet/tractor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgoodlet/tractor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgoodlet/tractor/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgoodlet/tractor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgoodlet/tractor/statuses/{sha}","languages_url":"https://api.github.com/repos/tgoodlet/tractor/languages","stargazers_url":"https://api.github.com/repos/tgoodlet/tractor/stargazers","contributors_url":"https://api.github.com/repos/tgoodlet/tractor/contributors","subscribers_url":"https://api.github.com/repos/tgoodlet/tractor/subscribers","subscription_url":"https://api.github.com/repos/tgoodlet/tractor/subscription","commits_url":"https://api.github.com/repos/tgoodlet/tractor/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgoodlet/tractor/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgoodlet/tractor/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgoodlet/tractor/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgoodlet/tractor/contents/{+path}","compare_url":"https://api.github.com/repos/tgoodlet/tractor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgoodlet/tractor/merges","archive_url":"https://api.github.com/repos/tgoodlet/tractor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgoodlet/tractor/downloads","issues_url":"https://api.github.com/repos/tgoodlet/tractor/issues{/number}","pulls_url":"https://api.github.com/repos/tgoodlet/tractor/pulls{/number}","milestones_url":"https://api.github.com/repos/tgoodlet/tractor/milestones{/number}","notifications_url":"https://api.github.com/repos/tgoodlet/tractor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgoodlet/tractor/labels{/name}","releases_url":"https://api.github.com/repos/tgoodlet/tractor/releases{/id}","deployments_url":"https://api.github.com/repos/tgoodlet/tractor/deployments","created_at":"2018-07-05T20:01:14Z","updated_at":"2018-07-30T16:07:17Z","pushed_at":"2018-07-27T14:47:30Z","git_url":"git://github.com/tgoodlet/tractor.git","ssh_url":"git@github.com:tgoodlet/tractor.git","clone_url":"https://github.com/tgoodlet/tractor.git","svn_url":"https://github.com/tgoodlet/tractor","homepage":"","size":129,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":20,"watchers":4,"default_branch":"master"}},"base":{"label":"tgoodlet:master","ref":"master","sha":"f726bd81da3a9f9f0754ffa26c92edb3c3a68608","user":{"login":"tgoodlet","id":291685,"node_id":"MDQ6VXNlcjI5MTY4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291685?v=4","gravatar_id":"","url":"https://api.github.com/users/tgoodlet","html_url":"https://github.com/tgoodlet","followers_url":"https://api.github.com/users/tgoodlet/followers","following_url":"https://api.github.com/users/tgoodlet/following{/other_user}","gists_url":"https://api.github.com/users/tgoodlet/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoodlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoodlet/subscriptions","organizations_url":"https://api.github.com/users/tgoodlet/orgs","repos_url":"https://api.github.com/users/tgoodlet/repos","events_url":"https://api.github.com/users/tgoodlet/events{/privacy}","received_events_url":"https://api.github.com/users/tgoodlet/received_events","type":"User","site_admin":false},"repo":{"id":139894740,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4OTQ3NDA=","name":"tractor","full_name":"tgoodlet/tractor","owner":{"login":"tgoodlet","id":291685,"node_id":"MDQ6VXNlcjI5MTY4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291685?v=4","gravatar_id":"","url":"https://api.github.com/users/tgoodlet","html_url":"https://github.com/tgoodlet","followers_url":"https://api.github.com/users/tgoodlet/followers","following_url":"https://api.github.com/users/tgoodlet/following{/other_user}","gists_url":"https://api.github.com/users/tgoodlet/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoodlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoodlet/subscriptions","organizations_url":"https://api.github.com/users/tgoodlet/orgs","repos_url":"https://api.github.com/users/tgoodlet/repos","events_url":"https://api.github.com/users/tgoodlet/events{/privacy}","received_events_url":"https://api.github.com/users/tgoodlet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tgoodlet/tractor","description":"An async-native actor model built on trio","fork":false,"url":"https://api.github.com/repos/tgoodlet/tractor","forks_url":"https://api.github.com/repos/tgoodlet/tractor/forks","keys_url":"https://api.github.com/repos/tgoodlet/tractor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgoodlet/tractor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgoodlet/tractor/teams","hooks_url":"https://api.github.com/repos/tgoodlet/tractor/hooks","issue_events_url":"https://api.github.com/repos/tgoodlet/tractor/issues/events{/number}","events_url":"https://api.github.com/repos/tgoodlet/tractor/events","assignees_url":"https://api.github.com/repos/tgoodlet/tractor/assignees{/user}","branches_url":"https://api.github.com/repos/tgoodlet/tractor/branches{/branch}","tags_url":"https://api.github.com/repos/tgoodlet/tractor/tags","blobs_url":"https://api.github.com/repos/tgoodlet/tractor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgoodlet/tractor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgoodlet/tractor/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgoodlet/tractor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgoodlet/tractor/statuses/{sha}","languages_url":"https://api.github.com/repos/tgoodlet/tractor/languages","stargazers_url":"https://api.github.com/repos/tgoodlet/tractor/stargazers","contributors_url":"https://api.github.com/repos/tgoodlet/tractor/contributors","subscribers_url":"https://api.github.com/repos/tgoodlet/tractor/subscribers","subscription_url":"https://api.github.com/repos/tgoodlet/tractor/subscription","commits_url":"https://api.github.com/repos/tgoodlet/tractor/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgoodlet/tractor/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgoodlet/tractor/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgoodlet/tractor/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgoodlet/tractor/contents/{+path}","compare_url":"https://api.github.com/repos/tgoodlet/tractor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgoodlet/tractor/merges","archive_url":"https://api.github.com/repos/tgoodlet/tractor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgoodlet/tractor/downloads","issues_url":"https://api.github.com/repos/tgoodlet/tractor/issues{/number}","pulls_url":"https://api.github.com/repos/tgoodlet/tractor/pulls{/number}","milestones_url":"https://api.github.com/repos/tgoodlet/tractor/milestones{/number}","notifications_url":"https://api.github.com/repos/tgoodlet/tractor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgoodlet/tractor/labels{/name}","releases_url":"https://api.github.com/repos/tgoodlet/tractor/releases{/id}","deployments_url":"https://api.github.com/repos/tgoodlet/tractor/deployments","created_at":"2018-07-05T20:01:14Z","updated_at":"2018-07-30T16:07:17Z","pushed_at":"2018-07-27T14:47:30Z","git_url":"git://github.com/tgoodlet/tractor.git","ssh_url":"git@github.com:tgoodlet/tractor.git","clone_url":"https://github.com/tgoodlet/tractor.git","svn_url":"https://github.com/tgoodlet/tractor","homepage":"","size":129,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":20,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgoodlet/tractor/pulls/21"},"html":{"href":"https://github.com/tgoodlet/tractor/pull/21"},"issue":{"href":"https://api.github.com/repos/tgoodlet/tractor/issues/21"},"comments":{"href":"https://api.github.com/repos/tgoodlet/tractor/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/tgoodlet/tractor/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/tgoodlet/tractor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgoodlet/tractor/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/tgoodlet/tractor/statuses/cd17e29f6e05cf63acdc31dcf8631ab5ca4678db"}},"author_association":"OWNER"}}
{"actor":{"display_login":"vodik"}}