{"action":"created","comment":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/comments/193537132","pull_request_review_id":126528285,"id":193537132,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzUzNzEzMg==","diff_hunk":"@@ -245,6 +249,30 @@ proc open*(filename: string, mode: FileMode = fmRead,\n       if close(result.handle) == 0:\n         result.handle = -1\n \n+proc flush*(f: var MemFile; attempts: int = 3) =\n+  ## Flushes `f`'s buffer for the number of attempts equal to `attempts`.\n+  ## If were errors an exception `OSError` will be raised.\n+  when defined(windows):\n+    var retry = 0\n+    var res = false\n+    while retry <= attempts:\n+      res = flushViewOfFile(f.mem, 0) != 0\n+      if res:","path":"lib/pure/memfiles.nim","position":38,"original_position":38,"commit_id":"6dd0f4ee13179dc6cb5231d98ddaaac7742bc841","original_commit_id":"6dd0f4ee13179dc6cb5231d98ddaaac7742bc841","user":{"login":"dom96","id":246651,"node_id":"MDQ6VXNlcjI0NjY1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/246651?v=4","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":"Also, you're retrying no matter what the error is, that's bad. Only retry on the ``ERROR_LOCK_VIOLATION`` error!","created_at":"2018-06-06T19:50:01Z","updated_at":"2018-06-06T19:50:02Z","html_url":"https://github.com/nim-lang/Nim/pull/7944#discussion_r193537132","pull_request_url":"https://api.github.com/repos/nim-lang/Nim/pulls/7944","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/comments/193537132"},"html":{"href":"https://github.com/nim-lang/Nim/pull/7944#discussion_r193537132"},"pull_request":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/7944"}}},"pull_request":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/7944","id":192188132,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMTg4MTMy","html_url":"https://github.com/nim-lang/Nim/pull/7944","diff_url":"https://github.com/nim-lang/Nim/pull/7944.diff","patch_url":"https://github.com/nim-lang/Nim/pull/7944.patch","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/7944","number":7944,"state":"open","locked":false,"title":"Add MemMapFileStream. Fixes in memFiles.","user":{"login":"data-man","id":1754269,"node_id":"MDQ6VXNlcjE3NTQyNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1754269?v=4","gravatar_id":"","url":"https://api.github.com/users/data-man","html_url":"https://github.com/data-man","followers_url":"https://api.github.com/users/data-man/followers","following_url":"https://api.github.com/users/data-man/following{/other_user}","gists_url":"https://api.github.com/users/data-man/gists{/gist_id}","starred_url":"https://api.github.com/users/data-man/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-man/subscriptions","organizations_url":"https://api.github.com/users/data-man/orgs","repos_url":"https://api.github.com/users/data-man/repos","events_url":"https://api.github.com/users/data-man/events{/privacy}","received_events_url":"https://api.github.com/users/data-man/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-02T08:53:30Z","updated_at":"2018-06-06T19:50:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23322871ec20c798420b173f896efb26e5feba27","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nim-lang/Nim/pulls/7944/commits","review_comments_url":"https://api.github.com/repos/nim-lang/Nim/pulls/7944/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/7944/comments","statuses_url":"https://api.github.com/repos/nim-lang/Nim/statuses/6dd0f4ee13179dc6cb5231d98ddaaac7742bc841","head":{"label":"data-man:mem_map_stream","ref":"mem_map_stream","sha":"6dd0f4ee13179dc6cb5231d98ddaaac7742bc841","user":{"login":"data-man","id":1754269,"node_id":"MDQ6VXNlcjE3NTQyNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1754269?v=4","gravatar_id":"","url":"https://api.github.com/users/data-man","html_url":"https://github.com/data-man","followers_url":"https://api.github.com/users/data-man/followers","following_url":"https://api.github.com/users/data-man/following{/other_user}","gists_url":"https://api.github.com/users/data-man/gists{/gist_id}","starred_url":"https://api.github.com/users/data-man/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-man/subscriptions","organizations_url":"https://api.github.com/users/data-man/orgs","repos_url":"https://api.github.com/users/data-man/repos","events_url":"https://api.github.com/users/data-man/events{/privacy}","received_events_url":"https://api.github.com/users/data-man/received_events","type":"User","site_admin":false},"repo":{"id":108122342,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgxMjIzNDI=","name":"Nim","full_name":"data-man/Nim","owner":{"login":"data-man","id":1754269,"node_id":"MDQ6VXNlcjE3NTQyNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1754269?v=4","gravatar_id":"","url":"https://api.github.com/users/data-man","html_url":"https://github.com/data-man","followers_url":"https://api.github.com/users/data-man/followers","following_url":"https://api.github.com/users/data-man/following{/other_user}","gists_url":"https://api.github.com/users/data-man/gists{/gist_id}","starred_url":"https://api.github.com/users/data-man/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-man/subscriptions","organizations_url":"https://api.github.com/users/data-man/orgs","repos_url":"https://api.github.com/users/data-man/repos","events_url":"https://api.github.com/users/data-man/events{/privacy}","received_events_url":"https://api.github.com/users/data-man/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/data-man/Nim","description":"Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in the order of priority).","fork":true,"url":"https://api.github.com/repos/data-man/Nim","forks_url":"https://api.github.com/repos/data-man/Nim/forks","keys_url":"https://api.github.com/repos/data-man/Nim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/data-man/Nim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/data-man/Nim/teams","hooks_url":"https://api.github.com/repos/data-man/Nim/hooks","issue_events_url":"https://api.github.com/repos/data-man/Nim/issues/events{/number}","events_url":"https://api.github.com/repos/data-man/Nim/events","assignees_url":"https://api.github.com/repos/data-man/Nim/assignees{/user}","branches_url":"https://api.github.com/repos/data-man/Nim/branches{/branch}","tags_url":"https://api.github.com/repos/data-man/Nim/tags","blobs_url":"https://api.github.com/repos/data-man/Nim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/data-man/Nim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/data-man/Nim/git/refs{/sha}","trees_url":"https://api.github.com/repos/data-man/Nim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/data-man/Nim/statuses/{sha}","languages_url":"https://api.github.com/repos/data-man/Nim/languages","stargazers_url":"https://api.github.com/repos/data-man/Nim/stargazers","contributors_url":"https://api.github.com/repos/data-man/Nim/contributors","subscribers_url":"https://api.github.com/repos/data-man/Nim/subscribers","subscription_url":"https://api.github.com/repos/data-man/Nim/subscription","commits_url":"https://api.github.com/repos/data-man/Nim/commits{/sha}","git_commits_url":"https://api.github.com/repos/data-man/Nim/git/commits{/sha}","comments_url":"https://api.github.com/repos/data-man/Nim/comments{/number}","issue_comment_url":"https://api.github.com/repos/data-man/Nim/issues/comments{/number}","contents_url":"https://api.github.com/repos/data-man/Nim/contents/{+path}","compare_url":"https://api.github.com/repos/data-man/Nim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/data-man/Nim/merges","archive_url":"https://api.github.com/repos/data-man/Nim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/data-man/Nim/downloads","issues_url":"https://api.github.com/repos/data-man/Nim/issues{/number}","pulls_url":"https://api.github.com/repos/data-man/Nim/pulls{/number}","milestones_url":"https://api.github.com/repos/data-man/Nim/milestones{/number}","notifications_url":"https://api.github.com/repos/data-man/Nim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/data-man/Nim/labels{/name}","releases_url":"https://api.github.com/repos/data-man/Nim/releases{/id}","deployments_url":"https://api.github.com/repos/data-man/Nim/deployments","created_at":"2017-10-24T12:17:21Z","updated_at":"2017-10-24T12:17:28Z","pushed_at":"2018-06-06T15:58:37Z","git_url":"git://github.com/data-man/Nim.git","ssh_url":"git@github.com:data-man/Nim.git","clone_url":"https://github.com/data-man/Nim.git","svn_url":"https://github.com/data-man/Nim","homepage":"http://nim-lang.org/","size":67766,"stargazers_count":0,"watchers_count":0,"language":"Nim","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"nim-lang:devel","ref":"devel","sha":"42329e0a7002567c1b3cc61d1defa0dc794607bb","user":{"login":"nim-lang","id":603863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMzg2Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/603863?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk4NDIwMzc=","name":"Nim","full_name":"nim-lang/Nim","owner":{"login":"nim-lang","id":603863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMzg2Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/603863?v=4","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 is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that 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":"2018-06-06T19:15:31Z","pushed_at":"2018-06-06T19:15:18Z","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":68399,"stargazers_count":4974,"watchers_count":4974,"language":"Nim","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":663,"mirror_url":null,"archived":false,"open_issues_count":1430,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":663,"open_issues":1430,"watchers":4974,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/7944"},"html":{"href":"https://github.com/nim-lang/Nim/pull/7944"},"issue":{"href":"https://api.github.com/repos/nim-lang/Nim/issues/7944"},"comments":{"href":"https://api.github.com/repos/nim-lang/Nim/issues/7944/comments"},"review_comments":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/7944/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/7944/commits"},"statuses":{"href":"https://api.github.com/repos/nim-lang/Nim/statuses/6dd0f4ee13179dc6cb5231d98ddaaac7742bc841"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dom96"}}