{"action":"created","comment":{"url":"https://api.github.com/repos/InStrong/Java2/pulls/comments/215664056","pull_request_review_id":152979787,"id":215664056,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTY2NDA1Ng==","diff_hunk":"@@ -0,0 +1,46 @@\n+package ru.geekbrains.java2.Lesson5;\n+\n+\n+public class Main extends Thread{\n+    static final int SIZE = 5000000;\n+    static final int h = SIZE / 2;\n+    public static void slowOne(){\n+        float[] arr = new float[SIZE];\n+        for (int  i=0;i<SIZE;i++){\n+            arr[i]=1f;}\n+        long a = System.currentTimeMillis();\n+        for (int  i=0;i<SIZE;i++){\n+            arr[i]=(float)(arr[i] * Math.sin(0.2f + i / 5) * Math.cos(0.2f + i / 5) * Math.cos(0.4f + i / 2));}\n+        System.out.println(System.currentTimeMillis() - a);\n+    }\n+    public static void fastOne (){\n+        float[] arr = new float[SIZE];\n+        float[] a1 = new float[h];\n+        float[] a2 = new float[h];\n+        long a = System.currentTimeMillis();\n+\n+        Thread thread1 = new Thread(() -> {\n+            for (int  i=0;i<SIZE;i++){\n+                arr[i]=1f;}\n+            System.arraycopy(arr, 0, a1, 0, h);\n+            System.arraycopy(arr, h, a2, 0, h);\n+            for (int  i=0;i<h;i++){\n+                a1[i]=(float)(a1[i] * Math.sin(0.2f + i / 5) * Math.cos(0.2f + i / 5) * Math.cos(0.4f + i / 2));}\n+        });\n+        thread1.start();\n+\n+        Thread thread2 = new Thread(() -> {","path":"src/ru/geekbrains/java2/Lesson5/Main.java","position":32,"original_position":32,"commit_id":"7fa93eaf891a4c00defa1d5ede1a96f3475770d6","original_commit_id":"7fa93eaf891a4c00defa1d5ede1a96f3475770d6","user":{"login":"batiaev","id":3200006,"node_id":"MDQ6VXNlcjMyMDAwMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/3200006?v=4","gravatar_id":"","url":"https://api.github.com/users/batiaev","html_url":"https://github.com/batiaev","followers_url":"https://api.github.com/users/batiaev/followers","following_url":"https://api.github.com/users/batiaev/following{/other_user}","gists_url":"https://api.github.com/users/batiaev/gists{/gist_id}","starred_url":"https://api.github.com/users/batiaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batiaev/subscriptions","organizations_url":"https://api.github.com/users/batiaev/orgs","repos_url":"https://api.github.com/users/batiaev/repos","events_url":"https://api.github.com/users/batiaev/events{/privacy}","received_events_url":"https://api.github.com/users/batiaev/received_events","type":"User","site_admin":false},"body":"не join-ятся потоки с текущим, расчет может не успеть пройти и выполнится копирование массивов","created_at":"2018-09-06T15:10:44Z","updated_at":"2018-09-06T15:10:56Z","html_url":"https://github.com/InStrong/Java2/pull/4#discussion_r215664056","pull_request_url":"https://api.github.com/repos/InStrong/Java2/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/InStrong/Java2/pulls/comments/215664056"},"html":{"href":"https://github.com/InStrong/Java2/pull/4#discussion_r215664056"},"pull_request":{"href":"https://api.github.com/repos/InStrong/Java2/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/InStrong/Java2/pulls/4","id":213434376,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDM0Mzc2","html_url":"https://github.com/InStrong/Java2/pull/4","diff_url":"https://github.com/InStrong/Java2/pull/4.diff","patch_url":"https://github.com/InStrong/Java2/pull/4.patch","issue_url":"https://api.github.com/repos/InStrong/Java2/issues/4","number":4,"state":"open","locked":false,"title":"ДЗ 5","user":{"login":"InStrong","id":25972751,"node_id":"MDQ6VXNlcjI1OTcyNzUx","avatar_url":"https://avatars2.githubusercontent.com/u/25972751?v=4","gravatar_id":"","url":"https://api.github.com/users/InStrong","html_url":"https://github.com/InStrong","followers_url":"https://api.github.com/users/InStrong/followers","following_url":"https://api.github.com/users/InStrong/following{/other_user}","gists_url":"https://api.github.com/users/InStrong/gists{/gist_id}","starred_url":"https://api.github.com/users/InStrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InStrong/subscriptions","organizations_url":"https://api.github.com/users/InStrong/orgs","repos_url":"https://api.github.com/users/InStrong/repos","events_url":"https://api.github.com/users/InStrong/events{/privacy}","received_events_url":"https://api.github.com/users/InStrong/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-05T21:32:53Z","updated_at":"2018-09-06T15:10:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de11db097a4cb93e2a544c8596fb9e88ff07d289","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/InStrong/Java2/pulls/4/commits","review_comments_url":"https://api.github.com/repos/InStrong/Java2/pulls/4/comments","review_comment_url":"https://api.github.com/repos/InStrong/Java2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/InStrong/Java2/issues/4/comments","statuses_url":"https://api.github.com/repos/InStrong/Java2/statuses/7fa93eaf891a4c00defa1d5ede1a96f3475770d6","head":{"label":"InStrong:lesson5","ref":"lesson5","sha":"7fa93eaf891a4c00defa1d5ede1a96f3475770d6","user":{"login":"InStrong","id":25972751,"node_id":"MDQ6VXNlcjI1OTcyNzUx","avatar_url":"https://avatars2.githubusercontent.com/u/25972751?v=4","gravatar_id":"","url":"https://api.github.com/users/InStrong","html_url":"https://github.com/InStrong","followers_url":"https://api.github.com/users/InStrong/followers","following_url":"https://api.github.com/users/InStrong/following{/other_user}","gists_url":"https://api.github.com/users/InStrong/gists{/gist_id}","starred_url":"https://api.github.com/users/InStrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InStrong/subscriptions","organizations_url":"https://api.github.com/users/InStrong/orgs","repos_url":"https://api.github.com/users/InStrong/repos","events_url":"https://api.github.com/users/InStrong/events{/privacy}","received_events_url":"https://api.github.com/users/InStrong/received_events","type":"User","site_admin":false},"repo":{"id":146124298,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYxMjQyOTg=","name":"Java2","full_name":"InStrong/Java2","owner":{"login":"InStrong","id":25972751,"node_id":"MDQ6VXNlcjI1OTcyNzUx","avatar_url":"https://avatars2.githubusercontent.com/u/25972751?v=4","gravatar_id":"","url":"https://api.github.com/users/InStrong","html_url":"https://github.com/InStrong","followers_url":"https://api.github.com/users/InStrong/followers","following_url":"https://api.github.com/users/InStrong/following{/other_user}","gists_url":"https://api.github.com/users/InStrong/gists{/gist_id}","starred_url":"https://api.github.com/users/InStrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InStrong/subscriptions","organizations_url":"https://api.github.com/users/InStrong/orgs","repos_url":"https://api.github.com/users/InStrong/repos","events_url":"https://api.github.com/users/InStrong/events{/privacy}","received_events_url":"https://api.github.com/users/InStrong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/InStrong/Java2","description":null,"fork":false,"url":"https://api.github.com/repos/InStrong/Java2","forks_url":"https://api.github.com/repos/InStrong/Java2/forks","keys_url":"https://api.github.com/repos/InStrong/Java2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/InStrong/Java2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/InStrong/Java2/teams","hooks_url":"https://api.github.com/repos/InStrong/Java2/hooks","issue_events_url":"https://api.github.com/repos/InStrong/Java2/issues/events{/number}","events_url":"https://api.github.com/repos/InStrong/Java2/events","assignees_url":"https://api.github.com/repos/InStrong/Java2/assignees{/user}","branches_url":"https://api.github.com/repos/InStrong/Java2/branches{/branch}","tags_url":"https://api.github.com/repos/InStrong/Java2/tags","blobs_url":"https://api.github.com/repos/InStrong/Java2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/InStrong/Java2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/InStrong/Java2/git/refs{/sha}","trees_url":"https://api.github.com/repos/InStrong/Java2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/InStrong/Java2/statuses/{sha}","languages_url":"https://api.github.com/repos/InStrong/Java2/languages","stargazers_url":"https://api.github.com/repos/InStrong/Java2/stargazers","contributors_url":"https://api.github.com/repos/InStrong/Java2/contributors","subscribers_url":"https://api.github.com/repos/InStrong/Java2/subscribers","subscription_url":"https://api.github.com/repos/InStrong/Java2/subscription","commits_url":"https://api.github.com/repos/InStrong/Java2/commits{/sha}","git_commits_url":"https://api.github.com/repos/InStrong/Java2/git/commits{/sha}","comments_url":"https://api.github.com/repos/InStrong/Java2/comments{/number}","issue_comment_url":"https://api.github.com/repos/InStrong/Java2/issues/comments{/number}","contents_url":"https://api.github.com/repos/InStrong/Java2/contents/{+path}","compare_url":"https://api.github.com/repos/InStrong/Java2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/InStrong/Java2/merges","archive_url":"https://api.github.com/repos/InStrong/Java2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/InStrong/Java2/downloads","issues_url":"https://api.github.com/repos/InStrong/Java2/issues{/number}","pulls_url":"https://api.github.com/repos/InStrong/Java2/pulls{/number}","milestones_url":"https://api.github.com/repos/InStrong/Java2/milestones{/number}","notifications_url":"https://api.github.com/repos/InStrong/Java2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/InStrong/Java2/labels{/name}","releases_url":"https://api.github.com/repos/InStrong/Java2/releases{/id}","deployments_url":"https://api.github.com/repos/InStrong/Java2/deployments","created_at":"2018-08-25T19:36:59Z","updated_at":"2018-09-05T20:17:28Z","pushed_at":"2018-09-06T14:42:42Z","git_url":"git://github.com/InStrong/Java2.git","ssh_url":"git@github.com:InStrong/Java2.git","clone_url":"https://github.com/InStrong/Java2.git","svn_url":"https://github.com/InStrong/Java2","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"InStrong:master","ref":"master","sha":"07fa971e704e8d7a24de7deeb5347c396c4f0f89","user":{"login":"InStrong","id":25972751,"node_id":"MDQ6VXNlcjI1OTcyNzUx","avatar_url":"https://avatars2.githubusercontent.com/u/25972751?v=4","gravatar_id":"","url":"https://api.github.com/users/InStrong","html_url":"https://github.com/InStrong","followers_url":"https://api.github.com/users/InStrong/followers","following_url":"https://api.github.com/users/InStrong/following{/other_user}","gists_url":"https://api.github.com/users/InStrong/gists{/gist_id}","starred_url":"https://api.github.com/users/InStrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InStrong/subscriptions","organizations_url":"https://api.github.com/users/InStrong/orgs","repos_url":"https://api.github.com/users/InStrong/repos","events_url":"https://api.github.com/users/InStrong/events{/privacy}","received_events_url":"https://api.github.com/users/InStrong/received_events","type":"User","site_admin":false},"repo":{"id":146124298,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYxMjQyOTg=","name":"Java2","full_name":"InStrong/Java2","owner":{"login":"InStrong","id":25972751,"node_id":"MDQ6VXNlcjI1OTcyNzUx","avatar_url":"https://avatars2.githubusercontent.com/u/25972751?v=4","gravatar_id":"","url":"https://api.github.com/users/InStrong","html_url":"https://github.com/InStrong","followers_url":"https://api.github.com/users/InStrong/followers","following_url":"https://api.github.com/users/InStrong/following{/other_user}","gists_url":"https://api.github.com/users/InStrong/gists{/gist_id}","starred_url":"https://api.github.com/users/InStrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InStrong/subscriptions","organizations_url":"https://api.github.com/users/InStrong/orgs","repos_url":"https://api.github.com/users/InStrong/repos","events_url":"https://api.github.com/users/InStrong/events{/privacy}","received_events_url":"https://api.github.com/users/InStrong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/InStrong/Java2","description":null,"fork":false,"url":"https://api.github.com/repos/InStrong/Java2","forks_url":"https://api.github.com/repos/InStrong/Java2/forks","keys_url":"https://api.github.com/repos/InStrong/Java2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/InStrong/Java2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/InStrong/Java2/teams","hooks_url":"https://api.github.com/repos/InStrong/Java2/hooks","issue_events_url":"https://api.github.com/repos/InStrong/Java2/issues/events{/number}","events_url":"https://api.github.com/repos/InStrong/Java2/events","assignees_url":"https://api.github.com/repos/InStrong/Java2/assignees{/user}","branches_url":"https://api.github.com/repos/InStrong/Java2/branches{/branch}","tags_url":"https://api.github.com/repos/InStrong/Java2/tags","blobs_url":"https://api.github.com/repos/InStrong/Java2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/InStrong/Java2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/InStrong/Java2/git/refs{/sha}","trees_url":"https://api.github.com/repos/InStrong/Java2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/InStrong/Java2/statuses/{sha}","languages_url":"https://api.github.com/repos/InStrong/Java2/languages","stargazers_url":"https://api.github.com/repos/InStrong/Java2/stargazers","contributors_url":"https://api.github.com/repos/InStrong/Java2/contributors","subscribers_url":"https://api.github.com/repos/InStrong/Java2/subscribers","subscription_url":"https://api.github.com/repos/InStrong/Java2/subscription","commits_url":"https://api.github.com/repos/InStrong/Java2/commits{/sha}","git_commits_url":"https://api.github.com/repos/InStrong/Java2/git/commits{/sha}","comments_url":"https://api.github.com/repos/InStrong/Java2/comments{/number}","issue_comment_url":"https://api.github.com/repos/InStrong/Java2/issues/comments{/number}","contents_url":"https://api.github.com/repos/InStrong/Java2/contents/{+path}","compare_url":"https://api.github.com/repos/InStrong/Java2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/InStrong/Java2/merges","archive_url":"https://api.github.com/repos/InStrong/Java2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/InStrong/Java2/downloads","issues_url":"https://api.github.com/repos/InStrong/Java2/issues{/number}","pulls_url":"https://api.github.com/repos/InStrong/Java2/pulls{/number}","milestones_url":"https://api.github.com/repos/InStrong/Java2/milestones{/number}","notifications_url":"https://api.github.com/repos/InStrong/Java2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/InStrong/Java2/labels{/name}","releases_url":"https://api.github.com/repos/InStrong/Java2/releases{/id}","deployments_url":"https://api.github.com/repos/InStrong/Java2/deployments","created_at":"2018-08-25T19:36:59Z","updated_at":"2018-09-05T20:17:28Z","pushed_at":"2018-09-06T14:42:42Z","git_url":"git://github.com/InStrong/Java2.git","ssh_url":"git@github.com:InStrong/Java2.git","clone_url":"https://github.com/InStrong/Java2.git","svn_url":"https://github.com/InStrong/Java2","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/InStrong/Java2/pulls/4"},"html":{"href":"https://github.com/InStrong/Java2/pull/4"},"issue":{"href":"https://api.github.com/repos/InStrong/Java2/issues/4"},"comments":{"href":"https://api.github.com/repos/InStrong/Java2/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/InStrong/Java2/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/InStrong/Java2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/InStrong/Java2/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/InStrong/Java2/statuses/7fa93eaf891a4c00defa1d5ede1a96f3475770d6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"batiaev"}}