{"action":"created","comment":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/comments/60557729","id":60557729,"diff_hunk":"@@ -640,45 +635,15 @@ when defined(windows) or defined(nimdoc):\n \n     let ret = WSARecv(socket.SocketHandle, addr dataBuf, 1, addr bytesReceived,\n                       addr flagsio, cast[POVERLAPPED](ol), nil)\n-    if ret == -1:\n+    # Processing of \"immediate completion\" operations was removed, because under\n+    # heavy load it can lead to deep recursion and stack overflow.\n+    # This change also dont affect speed.\n+    if ret != 0:\n       let err = osLastError()\n       if err.int32 != ERROR_IO_PENDING:\n-        if dataBuf.buf != nil:\n-          dealloc dataBuf.buf\n-          dataBuf.buf = nil\n+        dealloc dataBuf.buf\n         GC_unref(ol)\n-        if flags.isDisconnectionError(err):","path":"lib/pure/asyncdispatch.nim","position":36,"original_position":36,"commit_id":"452fb19a968787f27d2e6d51f5afa5996ae2b7f4","original_commit_id":"452fb19a968787f27d2e6d51f5afa5996ae2b7f4","user":{"login":"dom96","id":246651,"avatar_url":"https://avatars.githubusercontent.com/u/246651?v=3","gravatar_id":"","url":"https://api.github.com/users/dom96","html_url":"https://github.com/dom96","followers_url":"https://api.github.com/users/dom96/followers","following_url":"https://api.github.com/users/dom96/following{/other_user}","gists_url":"https://api.github.com/users/dom96/gists{/gist_id}","starred_url":"https://api.github.com/users/dom96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dom96/subscriptions","organizations_url":"https://api.github.com/users/dom96/orgs","repos_url":"https://api.github.com/users/dom96/repos","events_url":"https://api.github.com/users/dom96/events{/privacy}","received_events_url":"https://api.github.com/users/dom96/received_events","type":"User","site_admin":false},"body":"I don't think it's that easy to reproduce it. You've created a simple clean disconnection, but the ``isDisconnectionError`` handles many types of errors. I can't let you simply remove it.","created_at":"2016-04-21T10:20:10Z","updated_at":"2016-04-21T10:20:10Z","html_url":"https://github.com/nim-lang/Nim/pull/4098#discussion_r60557729","pull_request_url":"https://api.github.com/repos/nim-lang/Nim/pulls/4098","_links":{"self":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/comments/60557729"},"html":{"href":"https://github.com/nim-lang/Nim/pull/4098#discussion_r60557729"},"pull_request":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/4098"}}},"pull_request":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/4098","id":66937410,"html_url":"https://github.com/nim-lang/Nim/pull/4098","diff_url":"https://github.com/nim-lang/Nim/pull/4098.diff","patch_url":"https://github.com/nim-lang/Nim/pull/4098.patch","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/4098","number":4098,"state":"open","locked":false,"title":"Removing \"immediate completion\" handling in windows functions","user":{"login":"cheatfate","id":5955411,"avatar_url":"https://avatars.githubusercontent.com/u/5955411?v=3","gravatar_id":"","url":"https://api.github.com/users/cheatfate","html_url":"https://github.com/cheatfate","followers_url":"https://api.github.com/users/cheatfate/followers","following_url":"https://api.github.com/users/cheatfate/following{/other_user}","gists_url":"https://api.github.com/users/cheatfate/gists{/gist_id}","starred_url":"https://api.github.com/users/cheatfate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheatfate/subscriptions","organizations_url":"https://api.github.com/users/cheatfate/orgs","repos_url":"https://api.github.com/users/cheatfate/repos","events_url":"https://api.github.com/users/cheatfate/events{/privacy}","received_events_url":"https://api.github.com/users/cheatfate/received_events","type":"User","site_admin":false},"body":"Remove handling of \"immediate completion\" for windows functions [WSAConnectEx, WSARecv, WSASend, WSAAcceptEx]. Resolve #3919.\r\nThis change does not affect overall performance, because IOCP callback will be called even if operation \"completed immediately\". You can check proof here [https://msdn.microsoft.com/en-us/library/windows/desktop/aa365538(v=vs.85).aspx](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365538(v=vs.85).aspx) in description of FILE_SKIP_COMPLETION_PORT_ON_SUCCESS.\r\n","created_at":"2016-04-18T23:15:34Z","updated_at":"2016-04-21T10:20:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f782a3ae6b40c9749c2e5b1a7f6fdcf43a09ab5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nim-lang/Nim/pulls/4098/commits","review_comments_url":"https://api.github.com/repos/nim-lang/Nim/pulls/4098/comments","review_comment_url":"https://api.github.com/repos/nim-lang/Nim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/4098/comments","statuses_url":"https://api.github.com/repos/nim-lang/Nim/statuses/452fb19a968787f27d2e6d51f5afa5996ae2b7f4","head":{"label":"cheatfate:asyncdispatch1","ref":"asyncdispatch1","sha":"452fb19a968787f27d2e6d51f5afa5996ae2b7f4","user":{"login":"cheatfate","id":5955411,"avatar_url":"https://avatars.githubusercontent.com/u/5955411?v=3","gravatar_id":"","url":"https://api.github.com/users/cheatfate","html_url":"https://github.com/cheatfate","followers_url":"https://api.github.com/users/cheatfate/followers","following_url":"https://api.github.com/users/cheatfate/following{/other_user}","gists_url":"https://api.github.com/users/cheatfate/gists{/gist_id}","starred_url":"https://api.github.com/users/cheatfate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheatfate/subscriptions","organizations_url":"https://api.github.com/users/cheatfate/orgs","repos_url":"https://api.github.com/users/cheatfate/repos","events_url":"https://api.github.com/users/cheatfate/events{/privacy}","received_events_url":"https://api.github.com/users/cheatfate/received_events","type":"User","site_admin":false},"repo":{"id":52006838,"name":"Nim","full_name":"cheatfate/Nim","owner":{"login":"cheatfate","id":5955411,"avatar_url":"https://avatars.githubusercontent.com/u/5955411?v=3","gravatar_id":"","url":"https://api.github.com/users/cheatfate","html_url":"https://github.com/cheatfate","followers_url":"https://api.github.com/users/cheatfate/followers","following_url":"https://api.github.com/users/cheatfate/following{/other_user}","gists_url":"https://api.github.com/users/cheatfate/gists{/gist_id}","starred_url":"https://api.github.com/users/cheatfate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheatfate/subscriptions","organizations_url":"https://api.github.com/users/cheatfate/orgs","repos_url":"https://api.github.com/users/cheatfate/repos","events_url":"https://api.github.com/users/cheatfate/events{/privacy}","received_events_url":"https://api.github.com/users/cheatfate/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cheatfate/Nim","description":"Nim (formerly known as \"Nimrod\") is a compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio. Nim's design focuses on efficiency, expressiveness, elegance (in the order of priority).","fork":true,"url":"https://api.github.com/repos/cheatfate/Nim","forks_url":"https://api.github.com/repos/cheatfate/Nim/forks","keys_url":"https://api.github.com/repos/cheatfate/Nim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cheatfate/Nim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cheatfate/Nim/teams","hooks_url":"https://api.github.com/repos/cheatfate/Nim/hooks","issue_events_url":"https://api.github.com/repos/cheatfate/Nim/issues/events{/number}","events_url":"https://api.github.com/repos/cheatfate/Nim/events","assignees_url":"https://api.github.com/repos/cheatfate/Nim/assignees{/user}","branches_url":"https://api.github.com/repos/cheatfate/Nim/branches{/branch}","tags_url":"https://api.github.com/repos/cheatfate/Nim/tags","blobs_url":"https://api.github.com/repos/cheatfate/Nim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cheatfate/Nim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cheatfate/Nim/git/refs{/sha}","trees_url":"https://api.github.com/repos/cheatfate/Nim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cheatfate/Nim/statuses/{sha}","languages_url":"https://api.github.com/repos/cheatfate/Nim/languages","stargazers_url":"https://api.github.com/repos/cheatfate/Nim/stargazers","contributors_url":"https://api.github.com/repos/cheatfate/Nim/contributors","subscribers_url":"https://api.github.com/repos/cheatfate/Nim/subscribers","subscription_url":"https://api.github.com/repos/cheatfate/Nim/subscription","commits_url":"https://api.github.com/repos/cheatfate/Nim/commits{/sha}","git_commits_url":"https://api.github.com/repos/cheatfate/Nim/git/commits{/sha}","comments_url":"https://api.github.com/repos/cheatfate/Nim/comments{/number}","issue_comment_url":"https://api.github.com/repos/cheatfate/Nim/issues/comments{/number}","contents_url":"https://api.github.com/repos/cheatfate/Nim/contents/{+path}","compare_url":"https://api.github.com/repos/cheatfate/Nim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cheatfate/Nim/merges","archive_url":"https://api.github.com/repos/cheatfate/Nim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cheatfate/Nim/downloads","issues_url":"https://api.github.com/repos/cheatfate/Nim/issues{/number}","pulls_url":"https://api.github.com/repos/cheatfate/Nim/pulls{/number}","milestones_url":"https://api.github.com/repos/cheatfate/Nim/milestones{/number}","notifications_url":"https://api.github.com/repos/cheatfate/Nim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cheatfate/Nim/labels{/name}","releases_url":"https://api.github.com/repos/cheatfate/Nim/releases{/id}","deployments_url":"https://api.github.com/repos/cheatfate/Nim/deployments","created_at":"2016-02-18T12:51:17Z","updated_at":"2016-02-18T12:51:21Z","pushed_at":"2016-04-19T00:05:04Z","git_url":"git://github.com/cheatfate/Nim.git","ssh_url":"git@github.com:cheatfate/Nim.git","clone_url":"https://github.com/cheatfate/Nim.git","svn_url":"https://github.com/cheatfate/Nim","homepage":"http://nim-lang.org/","size":45173,"stargazers_count":0,"watchers_count":0,"language":"Nimrod","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"nim-lang:devel","ref":"devel","sha":"d7e8b89eb8f159e0220c48cd06233b7a6a060a72","user":{"login":"nim-lang","id":603863,"avatar_url":"https://avatars.githubusercontent.com/u/603863?v=3","gravatar_id":"","url":"https://api.github.com/users/nim-lang","html_url":"https://github.com/nim-lang","followers_url":"https://api.github.com/users/nim-lang/followers","following_url":"https://api.github.com/users/nim-lang/following{/other_user}","gists_url":"https://api.github.com/users/nim-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/nim-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nim-lang/subscriptions","organizations_url":"https://api.github.com/users/nim-lang/orgs","repos_url":"https://api.github.com/users/nim-lang/repos","events_url":"https://api.github.com/users/nim-lang/events{/privacy}","received_events_url":"https://api.github.com/users/nim-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":842037,"name":"Nim","full_name":"nim-lang/Nim","owner":{"login":"nim-lang","id":603863,"avatar_url":"https://avatars.githubusercontent.com/u/603863?v=3","gravatar_id":"","url":"https://api.github.com/users/nim-lang","html_url":"https://github.com/nim-lang","followers_url":"https://api.github.com/users/nim-lang/followers","following_url":"https://api.github.com/users/nim-lang/following{/other_user}","gists_url":"https://api.github.com/users/nim-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/nim-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nim-lang/subscriptions","organizations_url":"https://api.github.com/users/nim-lang/orgs","repos_url":"https://api.github.com/users/nim-lang/repos","events_url":"https://api.github.com/users/nim-lang/events{/privacy}","received_events_url":"https://api.github.com/users/nim-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nim-lang/Nim","description":"Nim (formerly known as \"Nimrod\") is a compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio. Nim's design focuses on efficiency, expressiveness, elegance (in the order of priority).","fork":false,"url":"https://api.github.com/repos/nim-lang/Nim","forks_url":"https://api.github.com/repos/nim-lang/Nim/forks","keys_url":"https://api.github.com/repos/nim-lang/Nim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nim-lang/Nim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nim-lang/Nim/teams","hooks_url":"https://api.github.com/repos/nim-lang/Nim/hooks","issue_events_url":"https://api.github.com/repos/nim-lang/Nim/issues/events{/number}","events_url":"https://api.github.com/repos/nim-lang/Nim/events","assignees_url":"https://api.github.com/repos/nim-lang/Nim/assignees{/user}","branches_url":"https://api.github.com/repos/nim-lang/Nim/branches{/branch}","tags_url":"https://api.github.com/repos/nim-lang/Nim/tags","blobs_url":"https://api.github.com/repos/nim-lang/Nim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nim-lang/Nim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nim-lang/Nim/git/refs{/sha}","trees_url":"https://api.github.com/repos/nim-lang/Nim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nim-lang/Nim/statuses/{sha}","languages_url":"https://api.github.com/repos/nim-lang/Nim/languages","stargazers_url":"https://api.github.com/repos/nim-lang/Nim/stargazers","contributors_url":"https://api.github.com/repos/nim-lang/Nim/contributors","subscribers_url":"https://api.github.com/repos/nim-lang/Nim/subscribers","subscription_url":"https://api.github.com/repos/nim-lang/Nim/subscription","commits_url":"https://api.github.com/repos/nim-lang/Nim/commits{/sha}","git_commits_url":"https://api.github.com/repos/nim-lang/Nim/git/commits{/sha}","comments_url":"https://api.github.com/repos/nim-lang/Nim/comments{/number}","issue_comment_url":"https://api.github.com/repos/nim-lang/Nim/issues/comments{/number}","contents_url":"https://api.github.com/repos/nim-lang/Nim/contents/{+path}","compare_url":"https://api.github.com/repos/nim-lang/Nim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nim-lang/Nim/merges","archive_url":"https://api.github.com/repos/nim-lang/Nim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nim-lang/Nim/downloads","issues_url":"https://api.github.com/repos/nim-lang/Nim/issues{/number}","pulls_url":"https://api.github.com/repos/nim-lang/Nim/pulls{/number}","milestones_url":"https://api.github.com/repos/nim-lang/Nim/milestones{/number}","notifications_url":"https://api.github.com/repos/nim-lang/Nim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nim-lang/Nim/labels{/name}","releases_url":"https://api.github.com/repos/nim-lang/Nim/releases{/id}","deployments_url":"https://api.github.com/repos/nim-lang/Nim/deployments","created_at":"2010-08-16T20:38:58Z","updated_at":"2016-04-20T05:23:55Z","pushed_at":"2016-04-19T16:13:43Z","git_url":"git://github.com/nim-lang/Nim.git","ssh_url":"git@github.com:nim-lang/Nim.git","clone_url":"https://github.com/nim-lang/Nim.git","svn_url":"https://github.com/nim-lang/Nim","homepage":"http://nim-lang.org/","size":356208,"stargazers_count":2764,"watchers_count":2764,"language":"Nimrod","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":380,"mirror_url":null,"open_issues_count":757,"forks":380,"open_issues":757,"watchers":2764,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/4098"},"html":{"href":"https://github.com/nim-lang/Nim/pull/4098"},"issue":{"href":"https://api.github.com/repos/nim-lang/Nim/issues/4098"},"comments":{"href":"https://api.github.com/repos/nim-lang/Nim/issues/4098/comments"},"review_comments":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/4098/comments"},"review_comment":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/4098/commits"},"statuses":{"href":"https://api.github.com/repos/nim-lang/Nim/statuses/452fb19a968787f27d2e6d51f5afa5996ae2b7f4"}}}}