{"action":"created","comment":{"url":"https://api.github.com/repos/ppy/osu-framework/pulls/comments/196646283","pull_request_review_id":130234502,"id":196646283,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjY0NjI4Mw==","diff_hunk":"@@ -135,22 +142,32 @@ private void dispose(bool isDisposing)\n         /// <see cref=\"Clock\"/> and <see cref=\"Dependencies\"/> are inherited from the target.\n         /// </param>\n         /// <param name=\"onLoaded\">Callback to be invoked on the update thread after loading is complete.</param>\n+        /// <param name=\"cancellationToken\">A cancellation token to cancel any async loading tasks.</param>\n         /// <returns>The task which is used for loading and callbacks.</returns>\n-        internal Task LoadAsync(Game game, Drawable target, Action onLoaded = null)\n+        internal Task LoadAsync(Game game, Drawable target, CancellationToken cancellationToken, Action onLoaded = null)\n         {\n             if (loadState == LoadState.NotLoaded)\n             {\n                 Debug.Assert(loadTask == null);\n                 loadState = LoadState.Loading;\n-                loadTask = Task.Factory.StartNew(() => Load(target.Clock, target.Dependencies), TaskCreationOptions.LongRunning);\n+                loadTask = Task.Factory.StartNew(() =>\n+                {\n+                    if (cancellationToken.IsCancellationRequested)\n+                        return;\n+\n+                    if (isDisposed || target.isDisposed)","path":"osu.Framework/Graphics/Drawable.cs","position":37,"original_position":37,"commit_id":"a2a7dd271c737c4e5f90bba02281ead233ecfb6a","original_commit_id":"a2a7dd271c737c4e5f90bba02281ead233ecfb6a","user":{"login":"smoogipoo","id":1329837,"node_id":"MDQ6VXNlcjEzMjk4Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1329837?v=4","gravatar_id":"","url":"https://api.github.com/users/smoogipoo","html_url":"https://github.com/smoogipoo","followers_url":"https://api.github.com/users/smoogipoo/followers","following_url":"https://api.github.com/users/smoogipoo/following{/other_user}","gists_url":"https://api.github.com/users/smoogipoo/gists{/gist_id}","starred_url":"https://api.github.com/users/smoogipoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smoogipoo/subscriptions","organizations_url":"https://api.github.com/users/smoogipoo/orgs","repos_url":"https://api.github.com/users/smoogipoo/repos","events_url":"https://api.github.com/users/smoogipoo/events{/privacy}","received_events_url":"https://api.github.com/users/smoogipoo/received_events","type":"User","site_admin":false},"body":"Redundant? The cancellation token should handle this case.","created_at":"2018-06-20T04:39:02Z","updated_at":"2018-06-20T04:44:41Z","html_url":"https://github.com/ppy/osu-framework/pull/1631#discussion_r196646283","pull_request_url":"https://api.github.com/repos/ppy/osu-framework/pulls/1631","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/comments/196646283"},"html":{"href":"https://github.com/ppy/osu-framework/pull/1631#discussion_r196646283"},"pull_request":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1631"}}},"pull_request":{"url":"https://api.github.com/repos/ppy/osu-framework/pulls/1631","id":195428762,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NDI4NzYy","html_url":"https://github.com/ppy/osu-framework/pull/1631","diff_url":"https://github.com/ppy/osu-framework/pull/1631.diff","patch_url":"https://github.com/ppy/osu-framework/pull/1631.patch","issue_url":"https://api.github.com/repos/ppy/osu-framework/issues/1631","number":1631,"state":"open","locked":false,"title":"Add naive concurrency limiting for drawable async load","user":{"login":"peppy","id":191335,"node_id":"MDQ6VXNlcjE5MTMzNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"body":"Will probably require more control over the scheduler being used, but this should be a sane starting point. PRing for further testing with osu!.","created_at":"2018-06-18T06:03:06Z","updated_at":"2018-06-20T04:44:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4345192b1ae40f49b6a201407a22e5523dcddb72","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":450593628,"node_id":"MDU6TGFiZWw0NTA1OTM2Mjg=","url":"https://api.github.com/repos/ppy/osu-framework/labels/WIP","name":"WIP","color":"006b75","default":false},{"id":459722628,"node_id":"MDU6TGFiZWw0NTk3MjI2Mjg=","url":"https://api.github.com/repos/ppy/osu-framework/labels/performance","name":"performance","color":"e25a61","default":false}],"milestone":{"url":"https://api.github.com/repos/ppy/osu-framework/milestones/5","html_url":"https://github.com/ppy/osu-framework/milestone/5","labels_url":"https://api.github.com/repos/ppy/osu-framework/milestones/5/labels","id":2927610,"node_id":"MDk6TWlsZXN0b25lMjkyNzYxMA==","number":5,"title":"Candidate Issues","description":"Issues which are relatively high priority and need to be added to a milestone.","creator":{"login":"peppy","id":191335,"node_id":"MDQ6VXNlcjE5MTMzNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":30,"state":"open","created_at":"2017-11-21T06:50:49Z","updated_at":"2018-06-19T13:57:05Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ppy/osu-framework/pulls/1631/commits","review_comments_url":"https://api.github.com/repos/ppy/osu-framework/pulls/1631/comments","review_comment_url":"https://api.github.com/repos/ppy/osu-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ppy/osu-framework/issues/1631/comments","statuses_url":"https://api.github.com/repos/ppy/osu-framework/statuses/a2a7dd271c737c4e5f90bba02281ead233ecfb6a","head":{"label":"peppy:concurrency-reduction","ref":"concurrency-reduction","sha":"a2a7dd271c737c4e5f90bba02281ead233ecfb6a","user":{"login":"peppy","id":191335,"node_id":"MDQ6VXNlcjE5MTMzNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"repo":{"id":66810604,"node_id":"MDEwOlJlcG9zaXRvcnk2NjgxMDYwNA==","name":"osu-framework","full_name":"peppy/osu-framework","owner":{"login":"peppy","id":191335,"node_id":"MDQ6VXNlcjE5MTMzNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peppy/osu-framework","description":"A game framework written with osu! in mind.","fork":true,"url":"https://api.github.com/repos/peppy/osu-framework","forks_url":"https://api.github.com/repos/peppy/osu-framework/forks","keys_url":"https://api.github.com/repos/peppy/osu-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peppy/osu-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peppy/osu-framework/teams","hooks_url":"https://api.github.com/repos/peppy/osu-framework/hooks","issue_events_url":"https://api.github.com/repos/peppy/osu-framework/issues/events{/number}","events_url":"https://api.github.com/repos/peppy/osu-framework/events","assignees_url":"https://api.github.com/repos/peppy/osu-framework/assignees{/user}","branches_url":"https://api.github.com/repos/peppy/osu-framework/branches{/branch}","tags_url":"https://api.github.com/repos/peppy/osu-framework/tags","blobs_url":"https://api.github.com/repos/peppy/osu-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peppy/osu-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peppy/osu-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/peppy/osu-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peppy/osu-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/peppy/osu-framework/languages","stargazers_url":"https://api.github.com/repos/peppy/osu-framework/stargazers","contributors_url":"https://api.github.com/repos/peppy/osu-framework/contributors","subscribers_url":"https://api.github.com/repos/peppy/osu-framework/subscribers","subscription_url":"https://api.github.com/repos/peppy/osu-framework/subscription","commits_url":"https://api.github.com/repos/peppy/osu-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/peppy/osu-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/peppy/osu-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/peppy/osu-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/peppy/osu-framework/contents/{+path}","compare_url":"https://api.github.com/repos/peppy/osu-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peppy/osu-framework/merges","archive_url":"https://api.github.com/repos/peppy/osu-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peppy/osu-framework/downloads","issues_url":"https://api.github.com/repos/peppy/osu-framework/issues{/number}","pulls_url":"https://api.github.com/repos/peppy/osu-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/peppy/osu-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/peppy/osu-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peppy/osu-framework/labels{/name}","releases_url":"https://api.github.com/repos/peppy/osu-framework/releases{/id}","deployments_url":"https://api.github.com/repos/peppy/osu-framework/deployments","created_at":"2016-08-29T04:12:29Z","updated_at":"2018-06-08T08:10:40Z","pushed_at":"2018-06-20T03:49:54Z","git_url":"git://github.com/peppy/osu-framework.git","ssh_url":"git@github.com:peppy/osu-framework.git","clone_url":"https://github.com/peppy/osu-framework.git","svn_url":"https://github.com/peppy/osu-framework","homepage":"","size":26622,"stargazers_count":4,"watchers_count":4,"language":"C#","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":4,"default_branch":"master"}},"base":{"label":"ppy:master","ref":"master","sha":"28fa2cb397d6c89155cb1d33442fa75c87dcbdb9","user":{"login":"ppy","id":995763,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTc2Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/995763?v=4","gravatar_id":"","url":"https://api.github.com/users/ppy","html_url":"https://github.com/ppy","followers_url":"https://api.github.com/users/ppy/followers","following_url":"https://api.github.com/users/ppy/following{/other_user}","gists_url":"https://api.github.com/users/ppy/gists{/gist_id}","starred_url":"https://api.github.com/users/ppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppy/subscriptions","organizations_url":"https://api.github.com/users/ppy/orgs","repos_url":"https://api.github.com/users/ppy/repos","events_url":"https://api.github.com/users/ppy/events{/privacy}","received_events_url":"https://api.github.com/users/ppy/received_events","type":"Organization","site_admin":false},"repo":{"id":66614524,"node_id":"MDEwOlJlcG9zaXRvcnk2NjYxNDUyNA==","name":"osu-framework","full_name":"ppy/osu-framework","owner":{"login":"ppy","id":995763,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTc2Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/995763?v=4","gravatar_id":"","url":"https://api.github.com/users/ppy","html_url":"https://github.com/ppy","followers_url":"https://api.github.com/users/ppy/followers","following_url":"https://api.github.com/users/ppy/following{/other_user}","gists_url":"https://api.github.com/users/ppy/gists{/gist_id}","starred_url":"https://api.github.com/users/ppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppy/subscriptions","organizations_url":"https://api.github.com/users/ppy/orgs","repos_url":"https://api.github.com/users/ppy/repos","events_url":"https://api.github.com/users/ppy/events{/privacy}","received_events_url":"https://api.github.com/users/ppy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ppy/osu-framework","description":"A game framework written with osu! in mind.","fork":false,"url":"https://api.github.com/repos/ppy/osu-framework","forks_url":"https://api.github.com/repos/ppy/osu-framework/forks","keys_url":"https://api.github.com/repos/ppy/osu-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ppy/osu-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ppy/osu-framework/teams","hooks_url":"https://api.github.com/repos/ppy/osu-framework/hooks","issue_events_url":"https://api.github.com/repos/ppy/osu-framework/issues/events{/number}","events_url":"https://api.github.com/repos/ppy/osu-framework/events","assignees_url":"https://api.github.com/repos/ppy/osu-framework/assignees{/user}","branches_url":"https://api.github.com/repos/ppy/osu-framework/branches{/branch}","tags_url":"https://api.github.com/repos/ppy/osu-framework/tags","blobs_url":"https://api.github.com/repos/ppy/osu-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ppy/osu-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ppy/osu-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/ppy/osu-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ppy/osu-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/ppy/osu-framework/languages","stargazers_url":"https://api.github.com/repos/ppy/osu-framework/stargazers","contributors_url":"https://api.github.com/repos/ppy/osu-framework/contributors","subscribers_url":"https://api.github.com/repos/ppy/osu-framework/subscribers","subscription_url":"https://api.github.com/repos/ppy/osu-framework/subscription","commits_url":"https://api.github.com/repos/ppy/osu-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/ppy/osu-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/ppy/osu-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/ppy/osu-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/ppy/osu-framework/contents/{+path}","compare_url":"https://api.github.com/repos/ppy/osu-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ppy/osu-framework/merges","archive_url":"https://api.github.com/repos/ppy/osu-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ppy/osu-framework/downloads","issues_url":"https://api.github.com/repos/ppy/osu-framework/issues{/number}","pulls_url":"https://api.github.com/repos/ppy/osu-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/ppy/osu-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/ppy/osu-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ppy/osu-framework/labels{/name}","releases_url":"https://api.github.com/repos/ppy/osu-framework/releases{/id}","deployments_url":"https://api.github.com/repos/ppy/osu-framework/deployments","created_at":"2016-08-26T03:45:35Z","updated_at":"2018-06-19T10:30:37Z","pushed_at":"2018-06-20T03:52:09Z","git_url":"git://github.com/ppy/osu-framework.git","ssh_url":"git@github.com:ppy/osu-framework.git","clone_url":"https://github.com/ppy/osu-framework.git","svn_url":"https://github.com/ppy/osu-framework","homepage":"","size":28761,"stargazers_count":243,"watchers_count":243,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":126,"mirror_url":null,"archived":false,"open_issues_count":81,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":126,"open_issues":81,"watchers":243,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1631"},"html":{"href":"https://github.com/ppy/osu-framework/pull/1631"},"issue":{"href":"https://api.github.com/repos/ppy/osu-framework/issues/1631"},"comments":{"href":"https://api.github.com/repos/ppy/osu-framework/issues/1631/comments"},"review_comments":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1631/comments"},"review_comment":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1631/commits"},"statuses":{"href":"https://api.github.com/repos/ppy/osu-framework/statuses/a2a7dd271c737c4e5f90bba02281ead233ecfb6a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"smoogipoo"}}