{"action":"created","issue":{"url":"https://api.github.com/repos/jlaffaye/ftp/issues/52","repository_url":"https://api.github.com/repos/jlaffaye/ftp","labels_url":"https://api.github.com/repos/jlaffaye/ftp/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/jlaffaye/ftp/issues/52/comments","events_url":"https://api.github.com/repos/jlaffaye/ftp/issues/52/events","html_url":"https://github.com/jlaffaye/ftp/pull/52","id":137420778,"number":52,"title":"Enable concurrent commands and uploads","user":{"login":"brianfoshee","id":155215,"avatar_url":"https://avatars.githubusercontent.com/u/155215?v=3","gravatar_id":"","url":"https://api.github.com/users/brianfoshee","html_url":"https://github.com/brianfoshee","followers_url":"https://api.github.com/users/brianfoshee/followers","following_url":"https://api.github.com/users/brianfoshee/following{/other_user}","gists_url":"https://api.github.com/users/brianfoshee/gists{/gist_id}","starred_url":"https://api.github.com/users/brianfoshee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianfoshee/subscriptions","organizations_url":"https://api.github.com/users/brianfoshee/orgs","repos_url":"https://api.github.com/users/brianfoshee/repos","events_url":"https://api.github.com/users/brianfoshee/events{/privacy}","received_events_url":"https://api.github.com/users/brianfoshee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-01T00:11:23Z","updated_at":"2016-03-01T15:28:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jlaffaye/ftp/pulls/52","html_url":"https://github.com/jlaffaye/ftp/pull/52","diff_url":"https://github.com/jlaffaye/ftp/pull/52.diff","patch_url":"https://github.com/jlaffaye/ftp/pull/52.patch"},"body":"ServerConn's textproto.Conn is safe for concurrent access. This adds\r\ncalls to conn's StartResponse() and EndResponse() to put that to use.\r\nhttps://golang.org/pkg/net/textproto/#Conn.Cmd\r\n\r\nNote: this changes the private API of ServerConn.cmdDataConnFrom() to\r\nreturn an uint which is the id of the underlying conn's pipeline. The\r\ncaller of that method MUST call conn.EndResponse(id) with that returned\r\nuint."},"comment":{"url":"https://api.github.com/repos/jlaffaye/ftp/issues/comments/190770721","html_url":"https://github.com/jlaffaye/ftp/pull/52#issuecomment-190770721","issue_url":"https://api.github.com/repos/jlaffaye/ftp/issues/52","id":190770721,"user":{"login":"brianfoshee","id":155215,"avatar_url":"https://avatars.githubusercontent.com/u/155215?v=3","gravatar_id":"","url":"https://api.github.com/users/brianfoshee","html_url":"https://github.com/brianfoshee","followers_url":"https://api.github.com/users/brianfoshee/followers","following_url":"https://api.github.com/users/brianfoshee/following{/other_user}","gists_url":"https://api.github.com/users/brianfoshee/gists{/gist_id}","starred_url":"https://api.github.com/users/brianfoshee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianfoshee/subscriptions","organizations_url":"https://api.github.com/users/brianfoshee/orgs","repos_url":"https://api.github.com/users/brianfoshee/repos","events_url":"https://api.github.com/users/brianfoshee/events{/privacy}","received_events_url":"https://api.github.com/users/brianfoshee/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T15:28:22Z","updated_at":"2016-03-01T15:28:22Z","body":"Update: tests don't pass when using that option. The response needs to be held throughout the entire command.\r\n\r\nI should probably change my wording on the PR. This will not enable concurrent uploads, per se, but it will make a single ServerConn instance safe to be passed around to multiple goroutines which is the use-case that I'm looking for. The StartResponse/EndResponse calls are safety checks to avoid contention."}}