{"action":"opened","issue":{"url":"https://api.github.com/repos/valum-framework/valum/issues/119","labels_url":"https://api.github.com/repos/valum-framework/valum/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/valum-framework/valum/issues/119/comments","events_url":"https://api.github.com/repos/valum-framework/valum/issues/119/events","html_url":"https://github.com/valum-framework/valum/issues/119","id":101453454,"number":119,"title":"FastCGI.request.accept is blocking and causes a deadlock","user":{"login":"arteymix","id":1318477,"avatar_url":"https://avatars.githubusercontent.com/u/1318477?v=3","gravatar_id":"","url":"https://api.github.com/users/arteymix","html_url":"https://github.com/arteymix","followers_url":"https://api.github.com/users/arteymix/followers","following_url":"https://api.github.com/users/arteymix/following{/other_user}","gists_url":"https://api.github.com/users/arteymix/gists{/gist_id}","starred_url":"https://api.github.com/users/arteymix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arteymix/subscriptions","organizations_url":"https://api.github.com/users/arteymix/orgs","repos_url":"https://api.github.com/users/arteymix/repos","events_url":"https://api.github.com/users/arteymix/events{/privacy}","received_events_url":"https://api.github.com/users/arteymix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/valum-framework/valum/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"arteymix","id":1318477,"avatar_url":"https://avatars.githubusercontent.com/u/1318477?v=3","gravatar_id":"","url":"https://api.github.com/users/arteymix","html_url":"https://github.com/arteymix","followers_url":"https://api.github.com/users/arteymix/followers","following_url":"https://api.github.com/users/arteymix/following{/other_user}","gists_url":"https://api.github.com/users/arteymix/gists{/gist_id}","starred_url":"https://api.github.com/users/arteymix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arteymix/subscriptions","organizations_url":"https://api.github.com/users/arteymix/orgs","repos_url":"https://api.github.com/users/arteymix/repos","events_url":"https://api.github.com/users/arteymix/events{/privacy}","received_events_url":"https://api.github.com/users/arteymix/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/valum-framework/valum/milestones/9","html_url":"https://github.com/valum-framework/valum/milestones/0.2.0","labels_url":"https://api.github.com/repos/valum-framework/valum/milestones/9/labels","id":1243258,"number":9,"title":"0.2.0","description":"","creator":{"login":"arteymix","id":1318477,"avatar_url":"https://avatars.githubusercontent.com/u/1318477?v=3","gravatar_id":"","url":"https://api.github.com/users/arteymix","html_url":"https://github.com/arteymix","followers_url":"https://api.github.com/users/arteymix/followers","following_url":"https://api.github.com/users/arteymix/following{/other_user}","gists_url":"https://api.github.com/users/arteymix/gists{/gist_id}","starred_url":"https://api.github.com/users/arteymix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arteymix/subscriptions","organizations_url":"https://api.github.com/users/arteymix/orgs","repos_url":"https://api.github.com/users/arteymix/repos","events_url":"https://api.github.com/users/arteymix/events{/privacy}","received_events_url":"https://api.github.com/users/arteymix/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2015-08-06T04:18:43Z","updated_at":"2015-08-17T15:54:01Z","due_on":"2015-08-15T04:00:00Z","closed_at":null},"comments":0,"created_at":"2015-08-17T15:54:01Z","updated_at":"2015-08-17T15:54:01Z","closed_at":null,"body":"Accepting a FastCGI request is a blocking operation (blocks until a new request record is available on the file descriptor). The current code will block on accepting and no further processing will occur, resulting in a dead lock.\r\n\r\nThere's two approach we might take:\r\n\r\n - accept in a thread\r\n - accept in a non-blocking way (by peeking the available record)\r\n\r\nI don't know how it can be possible to peek the available data on a socket, so it might just be simpler to accept using a thread, maybe a `ThreadPool`."}}