GitHub PullRequestReviewCommentEvent at 2014-06-14 22:42:22
Repository: enproxy
Actor: oxtoacart
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/getlantern/enproxy/pulls/comments/13783203","id":13783203,"diff_hunk":"@@ -0,0 +1,105 @@\n+package enproxy\n+\n+import (\n+\t\"io\"\n+\t\"time\"\n+)\n+\n+// submitWrite submits a write to the processWrites goroutine, returning true if\n+// the write was accepted or false if writes are no longer being accepted\n+func (c *Conn) submitWrite(b []byte) bool {\n+\tc.writeMutex.RLock()\n+\tdefer c.writeMutex.RUnlock()\n+\tif c.doneWriting {\n+\t\treturn false\n+\t} else {\n+\t\tc.writeRequestsCh <- b\n+\t\treturn true\n+\t}\n+}\n+\n+// processWrites processes write requests by writing them to the body of a POST\n+// request.  Note - processWrites doesn't actually send the POST requests,\n+// that's handled by the processRequests goroutine.  The reason that we do this\n+// on a separate goroutine is that the call to Request.Write() blocks until the\n+// body has finished, and of course the body is written to as a result of\n+// processing writes, so we need 2 goroutines to allow us to continue to\n+// accept writes and pipe these to the request body while actually sending that\n+// request body to the server.\n+func (c *Conn) processWrites() {","path":"conn_impl_writes.go","position":29,"original_position":29,"commit_id":"698d9df4d9473cc2a24328c12efa8377c5114479","original_commit_id":"698d9df4d9473cc2a24328c12efa8377c5114479","user":{"login":"oxtoacart","id":5000654,"avatar_url":"https://avatars.githubusercontent.com/u/5000654?","gravatar_id":"5f52a7b9a31fddc6d8055489096b830b","url":"https://api.github.com/users/oxtoacart","html_url":"https://github.com/oxtoacart","followers_url":"https://api.github.com/users/oxtoacart/followers","following_url":"https://api.github.com/users/oxtoacart/following{/other_user}","gists_url":"https://api.github.com/users/oxtoacart/gists{/gist_id}","starred_url":"https://api.github.com/users/oxtoacart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxtoacart/subscriptions","organizations_url":"https://api.github.com/users/oxtoacart/orgs","repos_url":"https://api.github.com/users/oxtoacart/repos","events_url":"https://api.github.com/users/oxtoacart/events{/privacy}","received_events_url":"https://api.github.com/users/oxtoacart/received_events","type":"User","site_admin":false},"body":"Good question.  It should be bounded by the size of the writeRequestCh channel size (100) and the buffer used by io.Copy (32 KB) which comes out to 3.2 MB.  Let me run a test and see.","created_at":"2014-06-14T22:42:22Z","updated_at":"2014-06-14T22:42:22Z","html_url":"https://github.com/getlantern/enproxy/pull/2#discussion_r13783203","pull_request_url":"https://api.github.com/repos/getlantern/enproxy/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/getlantern/enproxy/pulls/comments/13783203"},"html":{"href":"https://github.com/getlantern/enproxy/pull/2#discussion_r13783203"},"pull_request":{"href":"https://api.github.com/repos/getlantern/enproxy/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/getlantern/enproxy/pulls/2","id":17143469,"html_url":"https://github.com/getlantern/enproxy/pull/2","diff_url":"https://github.com/getlantern/enproxy/pull/2.diff","patch_url":"https://github.com/getlantern/enproxy/pull/2.patch","issue_url":"https://api.github.com/repos/getlantern/enproxy/issues/2","number":2,"state":"open","title":"Parallelized reading and writing","user":{"login":"oxtoacart","id":5000654,"avatar_url":"https://avatars.githubusercontent.com/u/5000654?","gravatar_id":"5f52a7b9a31fddc6d8055489096b830b","url":"https://api.github.com/users/oxtoacart","html_url":"https://github.com/oxtoacart","followers_url":"https://api.github.com/users/oxtoacart/followers","following_url":"https://api.github.com/users/oxtoacart/following{/other_user}","gists_url":"https://api.github.com/users/oxtoacart/gists{/gist_id}","starred_url":"https://api.github.com/users/oxtoacart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxtoacart/subscriptions","organizations_url":"https://api.github.com/users/oxtoacart/orgs","repos_url":"https://api.github.com/users/oxtoacart/repos","events_url":"https://api.github.com/users/oxtoacart/events{/privacy}","received_events_url":"https://api.github.com/users/oxtoacart/received_events","type":"User","site_admin":false},"body":"Resolves getlantern/lantern#1593","created_at":"2014-06-14T13:49:56Z","updated_at":"2014-06-14T22:42:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45e05774866b35bf278201121e22b8286c6e131f","assignee":{"login":"aranhoide","id":2204867,"avatar_url":"https://avatars.githubusercontent.com/u/2204867?","gravatar_id":"ce03058a6f8dc542d9f1b16f2a7eadc8","url":"https://api.github.com/users/aranhoide","html_url":"https://github.com/aranhoide","followers_url":"https://api.github.com/users/aranhoide/followers","following_url":"https://api.github.com/users/aranhoide/following{/other_user}","gists_url":"https://api.github.com/users/aranhoide/gists{/gist_id}","starred_url":"https://api.github.com/users/aranhoide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aranhoide/subscriptions","organizations_url":"https://api.github.com/users/aranhoide/orgs","repos_url":"https://api.github.com/users/aranhoide/repos","events_url":"https://api.github.com/users/aranhoide/events{/privacy}","received_events_url":"https://api.github.com/users/aranhoide/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/getlantern/enproxy/pulls/2/commits","review_comments_url":"https://api.github.com/repos/getlantern/enproxy/pulls/2/comments","review_comment_url":"https://api.github.com/repos/getlantern/enproxy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/getlantern/enproxy/issues/2/comments","statuses_url":"https://api.github.com/repos/getlantern/enproxy/statuses/698d9df4d9473cc2a24328c12efa8377c5114479","head":{"label":"getlantern:parallelized","ref":"parallelized","sha":"698d9df4d9473cc2a24328c12efa8377c5114479","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?","gravatar_id":"37baf1adaf44a84fd1c73634354d8547","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":20378186,"name":"enproxy","full_name":"getlantern/enproxy","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?","gravatar_id":"37baf1adaf44a84fd1c73634354d8547","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/enproxy","description":"Chained HTTP proxy that supports arbitrary TCP traffic tunneled over HTTP proxies using encapsulated HTTP requests","fork":false,"url":"https://api.github.com/repos/getlantern/enproxy","forks_url":"https://api.github.com/repos/getlantern/enproxy/forks","keys_url":"https://api.github.com/repos/getlantern/enproxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/enproxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/enproxy/teams","hooks_url":"https://api.github.com/repos/getlantern/enproxy/hooks","issue_events_url":"https://api.github.com/repos/getlantern/enproxy/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/enproxy/events","assignees_url":"https://api.github.com/repos/getlantern/enproxy/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/enproxy/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/enproxy/tags","blobs_url":"https://api.github.com/repos/getlantern/enproxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/enproxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/enproxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/enproxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/enproxy/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/enproxy/languages","stargazers_url":"https://api.github.com/repos/getlantern/enproxy/stargazers","contributors_url":"https://api.github.com/repos/getlantern/enproxy/contributors","subscribers_url":"https://api.github.com/repos/getlantern/enproxy/subscribers","subscription_url":"https://api.github.com/repos/getlantern/enproxy/subscription","commits_url":"https://api.github.com/repos/getlantern/enproxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/enproxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/enproxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/enproxy/issues/comments/{number}","contents_url":"https://api.github.com/repos/getlantern/enproxy/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/enproxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/enproxy/merges","archive_url":"https://api.github.com/repos/getlantern/enproxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/enproxy/downloads","issues_url":"https://api.github.com/repos/getlantern/enproxy/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/enproxy/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/enproxy/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/enproxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/enproxy/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/enproxy/releases{/id}","created_at":"2014-06-01T13:47:57Z","updated_at":"2014-06-14T16:56:07Z","pushed_at":"2014-06-14T16:56:07Z","git_url":"git://github.com/getlantern/enproxy.git","ssh_url":"git@github.com:getlantern/enproxy.git","clone_url":"https://github.com/getlantern/enproxy.git","svn_url":"https://github.com/getlantern/enproxy","homepage":"","size":616,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"getlantern:master","ref":"master","sha":"030b0ebda563e9c874942ba90754c98711d52320","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?","gravatar_id":"37baf1adaf44a84fd1c73634354d8547","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":20378186,"name":"enproxy","full_name":"getlantern/enproxy","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?","gravatar_id":"37baf1adaf44a84fd1c73634354d8547","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/enproxy","description":"Chained HTTP proxy that supports arbitrary TCP traffic tunneled over HTTP proxies using encapsulated HTTP requests","fork":false,"url":"https://api.github.com/repos/getlantern/enproxy","forks_url":"https://api.github.com/repos/getlantern/enproxy/forks","keys_url":"https://api.github.com/repos/getlantern/enproxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/enproxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/enproxy/teams","hooks_url":"https://api.github.com/repos/getlantern/enproxy/hooks","issue_events_url":"https://api.github.com/repos/getlantern/enproxy/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/enproxy/events","assignees_url":"https://api.github.com/repos/getlantern/enproxy/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/enproxy/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/enproxy/tags","blobs_url":"https://api.github.com/repos/getlantern/enproxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/enproxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/enproxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/enproxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/enproxy/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/enproxy/languages","stargazers_url":"https://api.github.com/repos/getlantern/enproxy/stargazers","contributors_url":"https://api.github.com/repos/getlantern/enproxy/contributors","subscribers_url":"https://api.github.com/repos/getlantern/enproxy/subscribers","subscription_url":"https://api.github.com/repos/getlantern/enproxy/subscription","commits_url":"https://api.github.com/repos/getlantern/enproxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/enproxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/enproxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/enproxy/issues/comments/{number}","contents_url":"https://api.github.com/repos/getlantern/enproxy/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/enproxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/enproxy/merges","archive_url":"https://api.github.com/repos/getlantern/enproxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/enproxy/downloads","issues_url":"https://api.github.com/repos/getlantern/enproxy/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/enproxy/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/enproxy/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/enproxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/enproxy/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/enproxy/releases{/id}","created_at":"2014-06-01T13:47:57Z","updated_at":"2014-06-14T16:56:07Z","pushed_at":"2014-06-14T16:56:07Z","git_url":"git://github.com/getlantern/enproxy.git","ssh_url":"git@github.com:getlantern/enproxy.git","clone_url":"https://github.com/getlantern/enproxy.git","svn_url":"https://github.com/getlantern/enproxy","homepage":"","size":616,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getlantern/enproxy/pulls/2"},"html":{"href":"https://github.com/getlantern/enproxy/pull/2"},"issue":{"href":"https://api.github.com/repos/getlantern/enproxy/issues/2"},"comments":{"href":"https://api.github.com/repos/getlantern/enproxy/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/getlantern/enproxy/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/getlantern/enproxy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/getlantern/enproxy/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/getlantern/enproxy/statuses/698d9df4d9473cc2a24328c12efa8377c5114479"}}}}