{"action":"created","issue":{"url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/231","repository_url":"https://api.github.com/repos/EvilBeaver/OneScript","labels_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/231/comments","events_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/231/events","html_url":"https://github.com/EvilBeaver/OneScript/issues/231","id":146919266,"number":231,"title":"API чтения потоков процесса требует расширения","user":{"login":"EvilBeaver","id":2657561,"avatar_url":"https://avatars.githubusercontent.com/u/2657561?v=3","gravatar_id":"","url":"https://api.github.com/users/EvilBeaver","html_url":"https://github.com/EvilBeaver","followers_url":"https://api.github.com/users/EvilBeaver/followers","following_url":"https://api.github.com/users/EvilBeaver/following{/other_user}","gists_url":"https://api.github.com/users/EvilBeaver/gists{/gist_id}","starred_url":"https://api.github.com/users/EvilBeaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvilBeaver/subscriptions","organizations_url":"https://api.github.com/users/EvilBeaver/orgs","repos_url":"https://api.github.com/users/EvilBeaver/repos","events_url":"https://api.github.com/users/EvilBeaver/events{/privacy}","received_events_url":"https://api.github.com/users/EvilBeaver/received_events","type":"User","site_admin":false},"labels":[{"id":354809708,"url":"https://api.github.com/repos/EvilBeaver/OneScript/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":385433311,"url":"https://api.github.com/repos/EvilBeaver/OneScript/labels/important","name":"important","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-02-05T09:27:16Z","updated_at":"2017-01-11T07:55:26Z","closed_at":null,"body":"Originally reported by: **EvilBeaver (Bitbucket: [EvilBeaver](http://bitbucket.org/EvilBeaver), GitHub: [EvilBeaver](http://github.com/EvilBeaver))**\n\n---\n\nСинхронные операции чтения потоков вывода/ошибок процесса недостаточно гибкие. В текущей реализации легко попасть на deadlock.\n\nТребуется дополнить API чтения потоков средствами разруливания блокировок и ожиданий чтения.\n\n---\n- Bitbucket: https://bitbucket.org/EvilBeaver/1script/issue/231\n"},"comment":{"url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/comments/271801930","html_url":"https://github.com/EvilBeaver/OneScript/issues/231#issuecomment-271801930","issue_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/231","id":271801930,"user":{"login":"EvilBeaver","id":2657561,"avatar_url":"https://avatars.githubusercontent.com/u/2657561?v=3","gravatar_id":"","url":"https://api.github.com/users/EvilBeaver","html_url":"https://github.com/EvilBeaver","followers_url":"https://api.github.com/users/EvilBeaver/followers","following_url":"https://api.github.com/users/EvilBeaver/following{/other_user}","gists_url":"https://api.github.com/users/EvilBeaver/gists{/gist_id}","starred_url":"https://api.github.com/users/EvilBeaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvilBeaver/subscriptions","organizations_url":"https://api.github.com/users/EvilBeaver/orgs","repos_url":"https://api.github.com/users/EvilBeaver/repos","events_url":"https://api.github.com/users/EvilBeaver/events{/privacy}","received_events_url":"https://api.github.com/users/EvilBeaver/received_events","type":"User","site_admin":false},"created_at":"2017-01-11T07:55:26Z","updated_at":"2017-01-11T07:55:26Z","body":"Да, есть статья в MSDN, краткая суть:\r\n\r\nЕсть два потока выхлопа: stdout и stderr. Если оба они будут читаться синхронно, то это потенциальный deadlock. Один из них должен читаться другим потоком в фоне.\r\n\r\nУ потока процесса есть некий буфер, куда он гадит. При переполнении буфера (если читающее приложение не вычитывает буфер), то ОС приостановит поток, ожидая, пока буфер вычитают.\r\n\r\nПриложение читает чей-то stdout, в этот момент читаемое приложение выдает ошибку и пишет в свой stderr. Переполняет его буфер и блокируется. но Читатель ждет пока закончится наполнение stdout, а оно уже никогда не закончится.\r\n\r\nРазруливается чтением в 2 Thread-а. В однопоточной среде нужны таймауты операций чтения на потоках IO."}}
{"actor":{"display_login":"EvilBeaver"}}