{"action":"created","comment":{"url":"https://api.github.com/repos/cscenter/hpcourse/pulls/comments/114075720","pull_request_review_id":35517192,"id":114075720,"diff_hunk":"@@ -0,0 +1,159 @@\n+import java.util.concurrent.atomic.AtomicInteger;\n+import java.util.concurrent.atomic.AtomicMarkableReference;\n+\n+\n+public class LockFreeSetImpl<T extends Comparable<T>> implements LockFreeSet {\n+    private AtomicMarkableReference<Node> head = new AtomicMarkableReference<>(null, false);\n+    private AtomicInteger size = new AtomicInteger(0);\n+\n+    private class Node {\n+        private AtomicMarkableReference<Node> next;\n+        private Comparable value;\n+\n+        Node(final Comparable value, final AtomicMarkableReference<Node> next) {\n+            this.value = value;\n+            this.next = next;\n+        }\n+    }\n+\n+    @Override\n+    public boolean add(Comparable value) {\n+        while (true) {\n+            // 1. If list is empty, set new head value\n+            if (head.getReference() == null) {","path":"csc/2017/2.LockFreeSet/semenova_anastasiia/LockFreeSetImpl.java","position":23,"original_position":23,"commit_id":"b9845c44448b21b905f54f2d05c5ae729e53458e","original_commit_id":"b9845c44448b21b905f54f2d05c5ae729e53458e","user":{"login":"EduardovEduard","id":698985,"avatar_url":"https://avatars3.githubusercontent.com/u/698985?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardovEduard","html_url":"https://github.com/EduardovEduard","followers_url":"https://api.github.com/users/EduardovEduard/followers","following_url":"https://api.github.com/users/EduardovEduard/following{/other_user}","gists_url":"https://api.github.com/users/EduardovEduard/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardovEduard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardovEduard/subscriptions","organizations_url":"https://api.github.com/users/EduardovEduard/orgs","repos_url":"https://api.github.com/users/EduardovEduard/repos","events_url":"https://api.github.com/users/EduardovEduard/events{/privacy}","received_events_url":"https://api.github.com/users/EduardovEduard/received_events","type":"User","site_admin":false},"body":"Не критично: Так как head - полноценный член списка, код добавления переусложнен. В оригинальном алгоритме Harris Lock-Free List голова представляет собой фиктивный элемент, а реальные значения хранятся начиная с head.next. Таким образом код добавления не разделяется на две ветви, и сильно упрощается.","created_at":"2017-04-30T13:46:12Z","updated_at":"2017-04-30T13:46:12Z","html_url":"https://github.com/cscenter/hpcourse/pull/99#discussion_r114075720","pull_request_url":"https://api.github.com/repos/cscenter/hpcourse/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/cscenter/hpcourse/pulls/comments/114075720"},"html":{"href":"https://github.com/cscenter/hpcourse/pull/99#discussion_r114075720"},"pull_request":{"href":"https://api.github.com/repos/cscenter/hpcourse/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/cscenter/hpcourse/pulls/99","id":116035739,"html_url":"https://github.com/cscenter/hpcourse/pull/99","diff_url":"https://github.com/cscenter/hpcourse/pull/99.diff","patch_url":"https://github.com/cscenter/hpcourse/pull/99.patch","issue_url":"https://api.github.com/repos/cscenter/hpcourse/issues/99","number":99,"state":"open","locked":false,"title":"Домашняя работа 2","user":{"login":"anastasia143","id":3573802,"avatar_url":"https://avatars0.githubusercontent.com/u/3573802?v=3","gravatar_id":"","url":"https://api.github.com/users/anastasia143","html_url":"https://github.com/anastasia143","followers_url":"https://api.github.com/users/anastasia143/followers","following_url":"https://api.github.com/users/anastasia143/following{/other_user}","gists_url":"https://api.github.com/users/anastasia143/gists{/gist_id}","starred_url":"https://api.github.com/users/anastasia143/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anastasia143/subscriptions","organizations_url":"https://api.github.com/users/anastasia143/orgs","repos_url":"https://api.github.com/users/anastasia143/repos","events_url":"https://api.github.com/users/anastasia143/events{/privacy}","received_events_url":"https://api.github.com/users/anastasia143/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-04-15T19:13:26Z","updated_at":"2017-04-30T13:46:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7de1eefd4027d30350cac0c1680bd0103789b3b6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cscenter/hpcourse/pulls/99/commits","review_comments_url":"https://api.github.com/repos/cscenter/hpcourse/pulls/99/comments","review_comment_url":"https://api.github.com/repos/cscenter/hpcourse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cscenter/hpcourse/issues/99/comments","statuses_url":"https://api.github.com/repos/cscenter/hpcourse/statuses/b9845c44448b21b905f54f2d05c5ae729e53458e","head":{"label":"anastasia143:master","ref":"master","sha":"b9845c44448b21b905f54f2d05c5ae729e53458e","user":{"login":"anastasia143","id":3573802,"avatar_url":"https://avatars0.githubusercontent.com/u/3573802?v=3","gravatar_id":"","url":"https://api.github.com/users/anastasia143","html_url":"https://github.com/anastasia143","followers_url":"https://api.github.com/users/anastasia143/followers","following_url":"https://api.github.com/users/anastasia143/following{/other_user}","gists_url":"https://api.github.com/users/anastasia143/gists{/gist_id}","starred_url":"https://api.github.com/users/anastasia143/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anastasia143/subscriptions","organizations_url":"https://api.github.com/users/anastasia143/orgs","repos_url":"https://api.github.com/users/anastasia143/repos","events_url":"https://api.github.com/users/anastasia143/events{/privacy}","received_events_url":"https://api.github.com/users/anastasia143/received_events","type":"User","site_admin":false},"repo":{"id":83973232,"name":"hpcourse","full_name":"anastasia143/hpcourse","owner":{"login":"anastasia143","id":3573802,"avatar_url":"https://avatars0.githubusercontent.com/u/3573802?v=3","gravatar_id":"","url":"https://api.github.com/users/anastasia143","html_url":"https://github.com/anastasia143","followers_url":"https://api.github.com/users/anastasia143/followers","following_url":"https://api.github.com/users/anastasia143/following{/other_user}","gists_url":"https://api.github.com/users/anastasia143/gists{/gist_id}","starred_url":"https://api.github.com/users/anastasia143/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anastasia143/subscriptions","organizations_url":"https://api.github.com/users/anastasia143/orgs","repos_url":"https://api.github.com/users/anastasia143/repos","events_url":"https://api.github.com/users/anastasia143/events{/privacy}","received_events_url":"https://api.github.com/users/anastasia143/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anastasia143/hpcourse","description":"Project is aimed to store student's practical works on high performance computing course","fork":true,"url":"https://api.github.com/repos/anastasia143/hpcourse","forks_url":"https://api.github.com/repos/anastasia143/hpcourse/forks","keys_url":"https://api.github.com/repos/anastasia143/hpcourse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anastasia143/hpcourse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anastasia143/hpcourse/teams","hooks_url":"https://api.github.com/repos/anastasia143/hpcourse/hooks","issue_events_url":"https://api.github.com/repos/anastasia143/hpcourse/issues/events{/number}","events_url":"https://api.github.com/repos/anastasia143/hpcourse/events","assignees_url":"https://api.github.com/repos/anastasia143/hpcourse/assignees{/user}","branches_url":"https://api.github.com/repos/anastasia143/hpcourse/branches{/branch}","tags_url":"https://api.github.com/repos/anastasia143/hpcourse/tags","blobs_url":"https://api.github.com/repos/anastasia143/hpcourse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anastasia143/hpcourse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anastasia143/hpcourse/git/refs{/sha}","trees_url":"https://api.github.com/repos/anastasia143/hpcourse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anastasia143/hpcourse/statuses/{sha}","languages_url":"https://api.github.com/repos/anastasia143/hpcourse/languages","stargazers_url":"https://api.github.com/repos/anastasia143/hpcourse/stargazers","contributors_url":"https://api.github.com/repos/anastasia143/hpcourse/contributors","subscribers_url":"https://api.github.com/repos/anastasia143/hpcourse/subscribers","subscription_url":"https://api.github.com/repos/anastasia143/hpcourse/subscription","commits_url":"https://api.github.com/repos/anastasia143/hpcourse/commits{/sha}","git_commits_url":"https://api.github.com/repos/anastasia143/hpcourse/git/commits{/sha}","comments_url":"https://api.github.com/repos/anastasia143/hpcourse/comments{/number}","issue_comment_url":"https://api.github.com/repos/anastasia143/hpcourse/issues/comments{/number}","contents_url":"https://api.github.com/repos/anastasia143/hpcourse/contents/{+path}","compare_url":"https://api.github.com/repos/anastasia143/hpcourse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anastasia143/hpcourse/merges","archive_url":"https://api.github.com/repos/anastasia143/hpcourse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anastasia143/hpcourse/downloads","issues_url":"https://api.github.com/repos/anastasia143/hpcourse/issues{/number}","pulls_url":"https://api.github.com/repos/anastasia143/hpcourse/pulls{/number}","milestones_url":"https://api.github.com/repos/anastasia143/hpcourse/milestones{/number}","notifications_url":"https://api.github.com/repos/anastasia143/hpcourse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anastasia143/hpcourse/labels{/name}","releases_url":"https://api.github.com/repos/anastasia143/hpcourse/releases{/id}","deployments_url":"https://api.github.com/repos/anastasia143/hpcourse/deployments","created_at":"2017-03-05T13:46:17Z","updated_at":"2017-03-05T13:46:19Z","pushed_at":"2017-04-15T18:44:54Z","git_url":"git://github.com/anastasia143/hpcourse.git","ssh_url":"git@github.com:anastasia143/hpcourse.git","clone_url":"https://github.com/anastasia143/hpcourse.git","svn_url":"https://github.com/anastasia143/hpcourse","homepage":null,"size":5495,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"master"}},"base":{"label":"cscenter:master","ref":"master","sha":"958cb0c5107daa8e375bdbcdb848724578f65fb3","user":{"login":"cscenter","id":5622041,"avatar_url":"https://avatars0.githubusercontent.com/u/5622041?v=3","gravatar_id":"","url":"https://api.github.com/users/cscenter","html_url":"https://github.com/cscenter","followers_url":"https://api.github.com/users/cscenter/followers","following_url":"https://api.github.com/users/cscenter/following{/other_user}","gists_url":"https://api.github.com/users/cscenter/gists{/gist_id}","starred_url":"https://api.github.com/users/cscenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cscenter/subscriptions","organizations_url":"https://api.github.com/users/cscenter/orgs","repos_url":"https://api.github.com/users/cscenter/repos","events_url":"https://api.github.com/users/cscenter/events{/privacy}","received_events_url":"https://api.github.com/users/cscenter/received_events","type":"Organization","site_admin":false},"repo":{"id":34339216,"name":"hpcourse","full_name":"cscenter/hpcourse","owner":{"login":"cscenter","id":5622041,"avatar_url":"https://avatars0.githubusercontent.com/u/5622041?v=3","gravatar_id":"","url":"https://api.github.com/users/cscenter","html_url":"https://github.com/cscenter","followers_url":"https://api.github.com/users/cscenter/followers","following_url":"https://api.github.com/users/cscenter/following{/other_user}","gists_url":"https://api.github.com/users/cscenter/gists{/gist_id}","starred_url":"https://api.github.com/users/cscenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cscenter/subscriptions","organizations_url":"https://api.github.com/users/cscenter/orgs","repos_url":"https://api.github.com/users/cscenter/repos","events_url":"https://api.github.com/users/cscenter/events{/privacy}","received_events_url":"https://api.github.com/users/cscenter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cscenter/hpcourse","description":"Project is aimed to store student's practical works on high performance computing course","fork":false,"url":"https://api.github.com/repos/cscenter/hpcourse","forks_url":"https://api.github.com/repos/cscenter/hpcourse/forks","keys_url":"https://api.github.com/repos/cscenter/hpcourse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cscenter/hpcourse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cscenter/hpcourse/teams","hooks_url":"https://api.github.com/repos/cscenter/hpcourse/hooks","issue_events_url":"https://api.github.com/repos/cscenter/hpcourse/issues/events{/number}","events_url":"https://api.github.com/repos/cscenter/hpcourse/events","assignees_url":"https://api.github.com/repos/cscenter/hpcourse/assignees{/user}","branches_url":"https://api.github.com/repos/cscenter/hpcourse/branches{/branch}","tags_url":"https://api.github.com/repos/cscenter/hpcourse/tags","blobs_url":"https://api.github.com/repos/cscenter/hpcourse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cscenter/hpcourse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cscenter/hpcourse/git/refs{/sha}","trees_url":"https://api.github.com/repos/cscenter/hpcourse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cscenter/hpcourse/statuses/{sha}","languages_url":"https://api.github.com/repos/cscenter/hpcourse/languages","stargazers_url":"https://api.github.com/repos/cscenter/hpcourse/stargazers","contributors_url":"https://api.github.com/repos/cscenter/hpcourse/contributors","subscribers_url":"https://api.github.com/repos/cscenter/hpcourse/subscribers","subscription_url":"https://api.github.com/repos/cscenter/hpcourse/subscription","commits_url":"https://api.github.com/repos/cscenter/hpcourse/commits{/sha}","git_commits_url":"https://api.github.com/repos/cscenter/hpcourse/git/commits{/sha}","comments_url":"https://api.github.com/repos/cscenter/hpcourse/comments{/number}","issue_comment_url":"https://api.github.com/repos/cscenter/hpcourse/issues/comments{/number}","contents_url":"https://api.github.com/repos/cscenter/hpcourse/contents/{+path}","compare_url":"https://api.github.com/repos/cscenter/hpcourse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cscenter/hpcourse/merges","archive_url":"https://api.github.com/repos/cscenter/hpcourse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cscenter/hpcourse/downloads","issues_url":"https://api.github.com/repos/cscenter/hpcourse/issues{/number}","pulls_url":"https://api.github.com/repos/cscenter/hpcourse/pulls{/number}","milestones_url":"https://api.github.com/repos/cscenter/hpcourse/milestones{/number}","notifications_url":"https://api.github.com/repos/cscenter/hpcourse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cscenter/hpcourse/labels{/name}","releases_url":"https://api.github.com/repos/cscenter/hpcourse/releases{/id}","deployments_url":"https://api.github.com/repos/cscenter/hpcourse/deployments","created_at":"2015-04-21T16:36:38Z","updated_at":"2017-04-17T08:34:19Z","pushed_at":"2017-04-30T11:53:14Z","git_url":"git://github.com/cscenter/hpcourse.git","ssh_url":"git@github.com:cscenter/hpcourse.git","clone_url":"https://github.com/cscenter/hpcourse.git","svn_url":"https://github.com/cscenter/hpcourse","homepage":null,"size":5607,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":38,"forks":88,"open_issues":38,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cscenter/hpcourse/pulls/99"},"html":{"href":"https://github.com/cscenter/hpcourse/pull/99"},"issue":{"href":"https://api.github.com/repos/cscenter/hpcourse/issues/99"},"comments":{"href":"https://api.github.com/repos/cscenter/hpcourse/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/cscenter/hpcourse/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/cscenter/hpcourse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cscenter/hpcourse/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/cscenter/hpcourse/statuses/b9845c44448b21b905f54f2d05c5ae729e53458e"}}}}
{"actor":{"display_login":"EduardovEduard"}}