{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/4868","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/4868/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/4868/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/4868/events","html_url":"https://github.com/dotnet/corefx/pull/4868","id":120868686,"number":4868,"title":"Remove sync APIs from SslStream and NegotiateStream","user":{"login":"davidsh","id":7684835,"avatar_url":"https://avatars.githubusercontent.com/u/7684835?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsh","html_url":"https://github.com/davidsh","followers_url":"https://api.github.com/users/davidsh/followers","following_url":"https://api.github.com/users/davidsh/following{/other_user}","gists_url":"https://api.github.com/users/davidsh/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsh/subscriptions","organizations_url":"https://api.github.com/users/davidsh/orgs","repos_url":"https://api.github.com/users/davidsh/repos","events_url":"https://api.github.com/users/davidsh/events{/privacy}","received_events_url":"https://api.github.com/users/davidsh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/2%20-%20In%20Progress","name":"2 - In Progress","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/6","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/6/labels","id":1365455,"number":6,"title":"1.0.0-rc2","description":"","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":170,"closed_issues":194,"state":"open","created_at":"2015-10-20T04:29:15Z","updated_at":"2015-12-16T23:43:47Z","due_on":"2016-02-02T08:00:00Z","closed_at":null},"comments":7,"created_at":"2015-12-07T21:11:13Z","updated_at":"2015-12-17T20:31:14Z","closed_at":"2015-12-08T02:46:04Z","pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/4868","html_url":"https://github.com/dotnet/corefx/pull/4868","diff_url":"https://github.com/dotnet/corefx/pull/4868.diff","patch_url":"https://github.com/dotnet/corefx/pull/4868.patch"},"body":"As per the System.Net.* API review dotnet/apireviews#21 removing\r\nthe sync versions of the AuthenticateAsClient, AuthenticateAsServer\r\nmethods from the SslStream and NegotiateStream classes.\r\n\r\nPart of #4732"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/165574252","html_url":"https://github.com/dotnet/corefx/pull/4868#issuecomment-165574252","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/4868","id":165574252,"user":{"login":"CIPop","id":8635911,"avatar_url":"https://avatars.githubusercontent.com/u/8635911?v=3","gravatar_id":"","url":"https://api.github.com/users/CIPop","html_url":"https://github.com/CIPop","followers_url":"https://api.github.com/users/CIPop/followers","following_url":"https://api.github.com/users/CIPop/following{/other_user}","gists_url":"https://api.github.com/users/CIPop/gists{/gist_id}","starred_url":"https://api.github.com/users/CIPop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CIPop/subscriptions","organizations_url":"https://api.github.com/users/CIPop/orgs","repos_url":"https://api.github.com/users/CIPop/repos","events_url":"https://api.github.com/users/CIPop/events{/privacy}","received_events_url":"https://api.github.com/users/CIPop/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T20:31:14Z","updated_at":"2015-12-17T20:31:14Z","body":"@roji I believe that the discussion is more general in nature and it's out of scope for this thread. Could you please open a separate issue to discuss the matter in a way that's not specific to SslStream?\r\n\r\nTo avoid delays and unblock your work, I'll write my answers here:\r\n\r\n> Without AuthenticateAsClient(), Open() must resort to calling an async method internally, which means that it's no longer purely synchronous...\r\n\r\nThe code above is as synchronous as the old implementation. When you call synchronous I/O on something like NetworkStream, internally, the thread will be waiting on an event for the operation to finish. Even more broadly: in reality there is no such thing as synchronous I/O in Windows.\r\n\r\n> One disadvantage of async I/O is the pressure put on the thread pool... \r\n\r\nPressure on a thread-pool shows poor design in the Async system. Ideally you should always try to keep the number of threads equal to the number of CPUs. Everything above that is going to add overheads of thread switching and memory consumption. This can be achieved by using TPL Async. The concurrency level can be controlled via the `TaskScheduler` class."}}