{"action":"created","comment":{"url":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/comments/86678696","pull_request_review_id":7326564,"id":86678696,"diff_hunk":"@@ -91,6 +95,59 @@ public function scheduleAsyncTaskToWorker(AsyncTask $task, $worker){\n \t\t$this->asyncPool->submitTaskToWorker($task, $worker);\n \t}\n \n+\t/**\n+\t * Stores any data that must not be passed to other threads or be serialized\n+\t *\n+\t * @internal Only call from AsyncTask.php\n+\t *\n+\t * @param AsyncTask     $for\n+\t * @param object|array $cmplx\n+\t *\n+\t * @throws \\RuntimeException if this method is called twice for the same instance of AsyncTask\n+\t */\n+\tpublic function storeLocalComplex(AsyncTask $for, $cmplx){\n+\t\tif(isset($this->objectStore[$for])){\n+\t\t\tthrow new \\RuntimeException(\"Already storing a complex for this AsyncTask\");\n+\t\t}\n+\t\t$this->objectStore[$for] = $cmplx;\n+\t}\n+\n+\t/**\n+\t * Fetches data that must not be passed to other threads or be serialized, previously stored with {@link #storeLocalComplex}\n+\t *\n+\t * @internal Only call from AsyncTask.php\n+\t *\n+\t * @param AsyncTask $for\n+\t *\n+\t * @throws \\RuntimException if no data associated with this AsyncTask can be found\n+\t */\t\n+\tpublic function fetchLocalComplex(AsyncTask $for){\n+\t\tif(!isset($this->objectStore[$for])){\n+\t\t\tthrow new \\RuntimeException(\"Attempt to fetch undefined complex\");\n+\t\t}\n+\t\t$cmplx = $this->objectStore[$for];\n+\t\tunset($this->objectStore[$for]);\n+\t\treturn $cmplx;\n+\t}\n+\n+\t/**\n+\t * Makes sure no data stored from {@link #storeLocalComplex} is left for a specific AsyncTask\n+\t *\n+\t * @internal Only call from AsyncTask.php\n+\t *\n+\t * @param AsyncTask $for\n+\t *\n+\t * @return bool returns false if any data are removed from this call, true otherwise\n+\t */\t\n+\tpublic function removeLocalComplex(AsyncTask $for) : bool{\n+\t\tif(isset($this->objectStore[$for])){\n+\t\t\tServer::getInstance()->getLogger()->debug(\"AsyncTask \" . get_class($for) . \" stored local complex data but did not remove them after completion\");","path":"src/pocketmine/scheduler/ServerScheduler.php","position":64,"original_position":64,"commit_id":"095f1837859c0605459b133b3c363d0e7fb8c3d4","original_commit_id":"095f1837859c0605459b133b3c363d0e7fb8c3d4","user":{"login":"SOF3","id":19623715,"avatar_url":"https://avatars.githubusercontent.com/u/19623715?v=3","gravatar_id":"","url":"https://api.github.com/users/SOF3","html_url":"https://github.com/SOF3","followers_url":"https://api.github.com/users/SOF3/followers","following_url":"https://api.github.com/users/SOF3/following{/other_user}","gists_url":"https://api.github.com/users/SOF3/gists{/gist_id}","starred_url":"https://api.github.com/users/SOF3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOF3/subscriptions","organizations_url":"https://api.github.com/users/SOF3/orgs","repos_url":"https://api.github.com/users/SOF3/repos","events_url":"https://api.github.com/users/SOF3/events{/privacy}","received_events_url":"https://api.github.com/users/SOF3/received_events","type":"User","site_admin":false},"body":"Question: Should this be at the WARN level instead?","created_at":"2016-11-06T04:18:50Z","updated_at":"2016-11-06T04:18:54Z","html_url":"https://github.com/pmmp/PocketMine-MP/pull/1#discussion_r86678696","pull_request_url":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/comments/86678696"},"html":{"href":"https://github.com/pmmp/PocketMine-MP/pull/1#discussion_r86678696"},"pull_request":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1","id":87593517,"html_url":"https://github.com/pmmp/PocketMine-MP/pull/1","diff_url":"https://github.com/pmmp/PocketMine-MP/pull/1.diff","patch_url":"https://github.com/pmmp/PocketMine-MP/pull/1.patch","issue_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/1","number":1,"state":"open","locked":false,"title":"Builtin thread-local object storage for AsyncTask","user":{"login":"SOF3","id":19623715,"avatar_url":"https://avatars.githubusercontent.com/u/19623715?v=3","gravatar_id":"","url":"https://api.github.com/users/SOF3","html_url":"https://github.com/SOF3","followers_url":"https://api.github.com/users/SOF3/followers","following_url":"https://api.github.com/users/SOF3/following{/other_user}","gists_url":"https://api.github.com/users/SOF3/gists{/gist_id}","starred_url":"https://api.github.com/users/SOF3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOF3/subscriptions","organizations_url":"https://api.github.com/users/SOF3/orgs","repos_url":"https://api.github.com/users/SOF3/repos","events_url":"https://api.github.com/users/SOF3/events{/privacy}","received_events_url":"https://api.github.com/users/SOF3/received_events","type":"User","site_admin":false},"body":"@dktapps deleted my original pull request. Blame him and ask him for description.\n","created_at":"2016-10-01T06:27:53Z","updated_at":"2016-11-06T04:18:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c82bd31395cce6f5468d6d19c5fae0e92305b4b2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1/commits","review_comments_url":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1/comments","review_comment_url":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/1/comments","statuses_url":"https://api.github.com/repos/pmmp/PocketMine-MP/statuses/095f1837859c0605459b133b3c363d0e7fb8c3d4","head":{"label":"SOF3:al","ref":"al","sha":"095f1837859c0605459b133b3c363d0e7fb8c3d4","user":{"login":"SOF3","id":19623715,"avatar_url":"https://avatars.githubusercontent.com/u/19623715?v=3","gravatar_id":"","url":"https://api.github.com/users/SOF3","html_url":"https://github.com/SOF3","followers_url":"https://api.github.com/users/SOF3/followers","following_url":"https://api.github.com/users/SOF3/following{/other_user}","gists_url":"https://api.github.com/users/SOF3/gists{/gist_id}","starred_url":"https://api.github.com/users/SOF3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOF3/subscriptions","organizations_url":"https://api.github.com/users/SOF3/orgs","repos_url":"https://api.github.com/users/SOF3/repos","events_url":"https://api.github.com/users/SOF3/events{/privacy}","received_events_url":"https://api.github.com/users/SOF3/received_events","type":"User","site_admin":false},"repo":{"id":69720937,"name":"pmmpl","full_name":"SOF3/pmmpl","owner":{"login":"SOF3","id":19623715,"avatar_url":"https://avatars.githubusercontent.com/u/19623715?v=3","gravatar_id":"","url":"https://api.github.com/users/SOF3","html_url":"https://github.com/SOF3","followers_url":"https://api.github.com/users/SOF3/followers","following_url":"https://api.github.com/users/SOF3/following{/other_user}","gists_url":"https://api.github.com/users/SOF3/gists{/gist_id}","starred_url":"https://api.github.com/users/SOF3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOF3/subscriptions","organizations_url":"https://api.github.com/users/SOF3/orgs","repos_url":"https://api.github.com/users/SOF3/repos","events_url":"https://api.github.com/users/SOF3/events{/privacy}","received_events_url":"https://api.github.com/users/SOF3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SOF3/pmmpl","description":null,"fork":true,"url":"https://api.github.com/repos/SOF3/pmmpl","forks_url":"https://api.github.com/repos/SOF3/pmmpl/forks","keys_url":"https://api.github.com/repos/SOF3/pmmpl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SOF3/pmmpl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SOF3/pmmpl/teams","hooks_url":"https://api.github.com/repos/SOF3/pmmpl/hooks","issue_events_url":"https://api.github.com/repos/SOF3/pmmpl/issues/events{/number}","events_url":"https://api.github.com/repos/SOF3/pmmpl/events","assignees_url":"https://api.github.com/repos/SOF3/pmmpl/assignees{/user}","branches_url":"https://api.github.com/repos/SOF3/pmmpl/branches{/branch}","tags_url":"https://api.github.com/repos/SOF3/pmmpl/tags","blobs_url":"https://api.github.com/repos/SOF3/pmmpl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SOF3/pmmpl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SOF3/pmmpl/git/refs{/sha}","trees_url":"https://api.github.com/repos/SOF3/pmmpl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SOF3/pmmpl/statuses/{sha}","languages_url":"https://api.github.com/repos/SOF3/pmmpl/languages","stargazers_url":"https://api.github.com/repos/SOF3/pmmpl/stargazers","contributors_url":"https://api.github.com/repos/SOF3/pmmpl/contributors","subscribers_url":"https://api.github.com/repos/SOF3/pmmpl/subscribers","subscription_url":"https://api.github.com/repos/SOF3/pmmpl/subscription","commits_url":"https://api.github.com/repos/SOF3/pmmpl/commits{/sha}","git_commits_url":"https://api.github.com/repos/SOF3/pmmpl/git/commits{/sha}","comments_url":"https://api.github.com/repos/SOF3/pmmpl/comments{/number}","issue_comment_url":"https://api.github.com/repos/SOF3/pmmpl/issues/comments{/number}","contents_url":"https://api.github.com/repos/SOF3/pmmpl/contents/{+path}","compare_url":"https://api.github.com/repos/SOF3/pmmpl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SOF3/pmmpl/merges","archive_url":"https://api.github.com/repos/SOF3/pmmpl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SOF3/pmmpl/downloads","issues_url":"https://api.github.com/repos/SOF3/pmmpl/issues{/number}","pulls_url":"https://api.github.com/repos/SOF3/pmmpl/pulls{/number}","milestones_url":"https://api.github.com/repos/SOF3/pmmpl/milestones{/number}","notifications_url":"https://api.github.com/repos/SOF3/pmmpl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SOF3/pmmpl/labels{/name}","releases_url":"https://api.github.com/repos/SOF3/pmmpl/releases{/id}","deployments_url":"https://api.github.com/repos/SOF3/pmmpl/deployments","created_at":"2016-10-01T05:19:10Z","updated_at":"2016-10-26T14:46:21Z","pushed_at":"2016-11-06T03:58:08Z","git_url":"git://github.com/SOF3/pmmpl.git","ssh_url":"git@github.com:SOF3/pmmpl.git","clone_url":"https://github.com/SOF3/pmmpl.git","svn_url":"https://github.com/SOF3/pmmpl","homepage":null,"size":12061,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"master"}},"base":{"label":"pmmp:master","ref":"master","sha":"3b7377370cd28a83f6ea4cd03cdbe3e7eb3f9be7","user":{"login":"pmmp","id":22548559,"avatar_url":"https://avatars.githubusercontent.com/u/22548559?v=3","gravatar_id":"","url":"https://api.github.com/users/pmmp","html_url":"https://github.com/pmmp","followers_url":"https://api.github.com/users/pmmp/followers","following_url":"https://api.github.com/users/pmmp/following{/other_user}","gists_url":"https://api.github.com/users/pmmp/gists{/gist_id}","starred_url":"https://api.github.com/users/pmmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmmp/subscriptions","organizations_url":"https://api.github.com/users/pmmp/orgs","repos_url":"https://api.github.com/users/pmmp/repos","events_url":"https://api.github.com/users/pmmp/events{/privacy}","received_events_url":"https://api.github.com/users/pmmp/received_events","type":"Organization","site_admin":false},"repo":{"id":69691727,"name":"PocketMine-MP","full_name":"pmmp/PocketMine-MP","owner":{"login":"pmmp","id":22548559,"avatar_url":"https://avatars.githubusercontent.com/u/22548559?v=3","gravatar_id":"","url":"https://api.github.com/users/pmmp","html_url":"https://github.com/pmmp","followers_url":"https://api.github.com/users/pmmp/followers","following_url":"https://api.github.com/users/pmmp/following{/other_user}","gists_url":"https://api.github.com/users/pmmp/gists{/gist_id}","starred_url":"https://api.github.com/users/pmmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmmp/subscriptions","organizations_url":"https://api.github.com/users/pmmp/orgs","repos_url":"https://api.github.com/users/pmmp/repos","events_url":"https://api.github.com/users/pmmp/events{/privacy}","received_events_url":"https://api.github.com/users/pmmp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pmmp/PocketMine-MP","description":"The new home of PocketMine.","fork":false,"url":"https://api.github.com/repos/pmmp/PocketMine-MP","forks_url":"https://api.github.com/repos/pmmp/PocketMine-MP/forks","keys_url":"https://api.github.com/repos/pmmp/PocketMine-MP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pmmp/PocketMine-MP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pmmp/PocketMine-MP/teams","hooks_url":"https://api.github.com/repos/pmmp/PocketMine-MP/hooks","issue_events_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/events{/number}","events_url":"https://api.github.com/repos/pmmp/PocketMine-MP/events","assignees_url":"https://api.github.com/repos/pmmp/PocketMine-MP/assignees{/user}","branches_url":"https://api.github.com/repos/pmmp/PocketMine-MP/branches{/branch}","tags_url":"https://api.github.com/repos/pmmp/PocketMine-MP/tags","blobs_url":"https://api.github.com/repos/pmmp/PocketMine-MP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pmmp/PocketMine-MP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pmmp/PocketMine-MP/git/refs{/sha}","trees_url":"https://api.github.com/repos/pmmp/PocketMine-MP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pmmp/PocketMine-MP/statuses/{sha}","languages_url":"https://api.github.com/repos/pmmp/PocketMine-MP/languages","stargazers_url":"https://api.github.com/repos/pmmp/PocketMine-MP/stargazers","contributors_url":"https://api.github.com/repos/pmmp/PocketMine-MP/contributors","subscribers_url":"https://api.github.com/repos/pmmp/PocketMine-MP/subscribers","subscription_url":"https://api.github.com/repos/pmmp/PocketMine-MP/subscription","commits_url":"https://api.github.com/repos/pmmp/PocketMine-MP/commits{/sha}","git_commits_url":"https://api.github.com/repos/pmmp/PocketMine-MP/git/commits{/sha}","comments_url":"https://api.github.com/repos/pmmp/PocketMine-MP/comments{/number}","issue_comment_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/comments{/number}","contents_url":"https://api.github.com/repos/pmmp/PocketMine-MP/contents/{+path}","compare_url":"https://api.github.com/repos/pmmp/PocketMine-MP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pmmp/PocketMine-MP/merges","archive_url":"https://api.github.com/repos/pmmp/PocketMine-MP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pmmp/PocketMine-MP/downloads","issues_url":"https://api.github.com/repos/pmmp/PocketMine-MP/issues{/number}","pulls_url":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls{/number}","milestones_url":"https://api.github.com/repos/pmmp/PocketMine-MP/milestones{/number}","notifications_url":"https://api.github.com/repos/pmmp/PocketMine-MP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pmmp/PocketMine-MP/labels{/name}","releases_url":"https://api.github.com/repos/pmmp/PocketMine-MP/releases{/id}","deployments_url":"https://api.github.com/repos/pmmp/PocketMine-MP/deployments","created_at":"2016-09-30T18:29:35Z","updated_at":"2016-11-05T21:12:59Z","pushed_at":"2016-11-06T03:58:09Z","git_url":"git://github.com/pmmp/PocketMine-MP.git","ssh_url":"git@github.com:pmmp/PocketMine-MP.git","clone_url":"https://github.com/pmmp/PocketMine-MP.git","svn_url":"https://github.com/pmmp/PocketMine-MP","homepage":"https://pmmp.gq","size":12346,"stargazers_count":152,"watchers_count":152,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":15,"forks":49,"open_issues":15,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1"},"html":{"href":"https://github.com/pmmp/PocketMine-MP/pull/1"},"issue":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/1"},"comments":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/pmmp/PocketMine-MP/statuses/095f1837859c0605459b133b3c363d0e7fb8c3d4"}}}}
{"actor":{"display_login":"SOF3"}}