{"action":"created","comment":{"url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/comments/28197845","id":28197845,"diff_hunk":"@@ -45,4 +46,67 @@ public void testTokenThrowsWhenCancelled() {\n       // Do nothing\n     }\n   }\n+\n+  public void testTokenCallsRegisteredActionWhenCancelled() {\n+    CancellationTokenSource cts = new CancellationTokenSource();\n+    CancellationToken token = cts.getToken();\n+    final Capture<Object> result = new Capture<>();\n+\n+    token.register(new Runnable() {\n+      @Override\n+      public void run() {\n+        result.set(\"Run!\");","path":"BoltsTest/src/bolts/CancellationTest.java","position":21,"original_position":21,"commit_id":"0b9c46f51330b47b2ca4db58c368b879ce58d05c","original_commit_id":"0b9c46f51330b47b2ca4db58c368b879ce58d05c","user":{"login":"grantland","id":277030,"avatar_url":"https://avatars.githubusercontent.com/u/277030?v=3","gravatar_id":"","url":"https://api.github.com/users/grantland","html_url":"https://github.com/grantland","followers_url":"https://api.github.com/users/grantland/followers","following_url":"https://api.github.com/users/grantland/following{/other_user}","gists_url":"https://api.github.com/users/grantland/gists{/gist_id}","starred_url":"https://api.github.com/users/grantland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grantland/subscriptions","organizations_url":"https://api.github.com/users/grantland/orgs","repos_url":"https://api.github.com/users/grantland/repos","events_url":"https://api.github.com/users/grantland/events{/privacy}","received_events_url":"https://api.github.com/users/grantland/received_events","type":"User","site_admin":false},"body":"do we need to call unregister/dispose/close?","created_at":"2015-04-11T19:42:12Z","updated_at":"2015-04-11T19:42:12Z","html_url":"https://github.com/BoltsFramework/Bolts-Android/pull/58#discussion_r28197845","pull_request_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/comments/28197845"},"html":{"href":"https://github.com/BoltsFramework/Bolts-Android/pull/58#discussion_r28197845"},"pull_request":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58","id":32626512,"html_url":"https://github.com/BoltsFramework/Bolts-Android/pull/58","diff_url":"https://github.com/BoltsFramework/Bolts-Android/pull/58.diff","patch_url":"https://github.com/BoltsFramework/Bolts-Android/pull/58.patch","issue_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/58","number":58,"state":"open","locked":false,"title":"Add CancellationToken#Register","user":{"login":"JosephEarl","id":2513147,"avatar_url":"https://avatars.githubusercontent.com/u/2513147?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephEarl","html_url":"https://github.com/JosephEarl","followers_url":"https://api.github.com/users/JosephEarl/followers","following_url":"https://api.github.com/users/JosephEarl/following{/other_user}","gists_url":"https://api.github.com/users/JosephEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephEarl/subscriptions","organizations_url":"https://api.github.com/users/JosephEarl/orgs","repos_url":"https://api.github.com/users/JosephEarl/repos","events_url":"https://api.github.com/users/JosephEarl/events{/privacy}","received_events_url":"https://api.github.com/users/JosephEarl/received_events","type":"User","site_admin":false},"body":"Adds `CancellationToken.register(Runnable)` to match https://msdn.microsoft.com/en-us/library/dd321635(v=vs.110).aspx","created_at":"2015-04-04T01:17:30Z","updated_at":"2015-04-11T19:42:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea47e41dc7dc56fe1488aa891849966b09dcfb4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58/commits","review_comments_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58/comments","review_comment_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/58/comments","statuses_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/statuses/0b9c46f51330b47b2ca4db58c368b879ce58d05c","head":{"label":"JosephEarl:feature/cancellation-token-register","ref":"feature/cancellation-token-register","sha":"0b9c46f51330b47b2ca4db58c368b879ce58d05c","user":{"login":"JosephEarl","id":2513147,"avatar_url":"https://avatars.githubusercontent.com/u/2513147?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephEarl","html_url":"https://github.com/JosephEarl","followers_url":"https://api.github.com/users/JosephEarl/followers","following_url":"https://api.github.com/users/JosephEarl/following{/other_user}","gists_url":"https://api.github.com/users/JosephEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephEarl/subscriptions","organizations_url":"https://api.github.com/users/JosephEarl/orgs","repos_url":"https://api.github.com/users/JosephEarl/repos","events_url":"https://api.github.com/users/JosephEarl/events{/privacy}","received_events_url":"https://api.github.com/users/JosephEarl/received_events","type":"User","site_admin":false},"repo":{"id":29488292,"name":"Bolts-Android","full_name":"JosephEarl/Bolts-Android","owner":{"login":"JosephEarl","id":2513147,"avatar_url":"https://avatars.githubusercontent.com/u/2513147?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephEarl","html_url":"https://github.com/JosephEarl","followers_url":"https://api.github.com/users/JosephEarl/followers","following_url":"https://api.github.com/users/JosephEarl/following{/other_user}","gists_url":"https://api.github.com/users/JosephEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephEarl/subscriptions","organizations_url":"https://api.github.com/users/JosephEarl/orgs","repos_url":"https://api.github.com/users/JosephEarl/repos","events_url":"https://api.github.com/users/JosephEarl/events{/privacy}","received_events_url":"https://api.github.com/users/JosephEarl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JosephEarl/Bolts-Android","description":"Bolts is a collection of low-level libraries designed to make developing mobile apps easier.","fork":true,"url":"https://api.github.com/repos/JosephEarl/Bolts-Android","forks_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/forks","keys_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/teams","hooks_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/hooks","issue_events_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/issues/events{/number}","events_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/events","assignees_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/assignees{/user}","branches_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/branches{/branch}","tags_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/tags","blobs_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/languages","stargazers_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/stargazers","contributors_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/contributors","subscribers_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/subscribers","subscription_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/subscription","commits_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/contents/{+path}","compare_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/merges","archive_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/downloads","issues_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/issues{/number}","pulls_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/labels{/name}","releases_url":"https://api.github.com/repos/JosephEarl/Bolts-Android/releases{/id}","created_at":"2015-01-19T19:40:28Z","updated_at":"2015-04-03T17:41:10Z","pushed_at":"2015-04-04T01:55:04Z","git_url":"git://github.com/JosephEarl/Bolts-Android.git","ssh_url":"git@github.com:JosephEarl/Bolts-Android.git","clone_url":"https://github.com/JosephEarl/Bolts-Android.git","svn_url":"https://github.com/JosephEarl/Bolts-Android","homepage":"http://boltsframework.github.io/docs/android","size":545,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"BoltsFramework:master","ref":"master","sha":"03c2def985df4966b0136ff280ccee3b4f980d45","user":{"login":"BoltsFramework","id":6530429,"avatar_url":"https://avatars.githubusercontent.com/u/6530429?v=3","gravatar_id":"","url":"https://api.github.com/users/BoltsFramework","html_url":"https://github.com/BoltsFramework","followers_url":"https://api.github.com/users/BoltsFramework/followers","following_url":"https://api.github.com/users/BoltsFramework/following{/other_user}","gists_url":"https://api.github.com/users/BoltsFramework/gists{/gist_id}","starred_url":"https://api.github.com/users/BoltsFramework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoltsFramework/subscriptions","organizations_url":"https://api.github.com/users/BoltsFramework/orgs","repos_url":"https://api.github.com/users/BoltsFramework/repos","events_url":"https://api.github.com/users/BoltsFramework/events{/privacy}","received_events_url":"https://api.github.com/users/BoltsFramework/received_events","type":"Organization","site_admin":false},"repo":{"id":16368712,"name":"Bolts-Android","full_name":"BoltsFramework/Bolts-Android","owner":{"login":"BoltsFramework","id":6530429,"avatar_url":"https://avatars.githubusercontent.com/u/6530429?v=3","gravatar_id":"","url":"https://api.github.com/users/BoltsFramework","html_url":"https://github.com/BoltsFramework","followers_url":"https://api.github.com/users/BoltsFramework/followers","following_url":"https://api.github.com/users/BoltsFramework/following{/other_user}","gists_url":"https://api.github.com/users/BoltsFramework/gists{/gist_id}","starred_url":"https://api.github.com/users/BoltsFramework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoltsFramework/subscriptions","organizations_url":"https://api.github.com/users/BoltsFramework/orgs","repos_url":"https://api.github.com/users/BoltsFramework/repos","events_url":"https://api.github.com/users/BoltsFramework/events{/privacy}","received_events_url":"https://api.github.com/users/BoltsFramework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BoltsFramework/Bolts-Android","description":"Bolts is a collection of low-level libraries designed to make developing mobile apps easier.","fork":false,"url":"https://api.github.com/repos/BoltsFramework/Bolts-Android","forks_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/forks","keys_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/teams","hooks_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/hooks","issue_events_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/events{/number}","events_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/events","assignees_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/assignees{/user}","branches_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/branches{/branch}","tags_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/tags","blobs_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/languages","stargazers_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/stargazers","contributors_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/contributors","subscribers_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/subscribers","subscription_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/subscription","commits_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/contents/{+path}","compare_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/merges","archive_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/downloads","issues_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues{/number}","pulls_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/labels{/name}","releases_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/releases{/id}","created_at":"2014-01-30T04:58:14Z","updated_at":"2015-04-11T13:47:03Z","pushed_at":"2015-04-04T01:55:50Z","git_url":"git://github.com/BoltsFramework/Bolts-Android.git","ssh_url":"git@github.com:BoltsFramework/Bolts-Android.git","clone_url":"https://github.com/BoltsFramework/Bolts-Android.git","svn_url":"https://github.com/BoltsFramework/Bolts-Android","homepage":"http://boltsframework.github.io/docs/android","size":1142,"stargazers_count":1593,"watchers_count":1593,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":211,"mirror_url":null,"open_issues_count":10,"forks":211,"open_issues":10,"watchers":1593,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58"},"html":{"href":"https://github.com/BoltsFramework/Bolts-Android/pull/58"},"issue":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/58"},"comments":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/BoltsFramework/Bolts-Android/statuses/0b9c46f51330b47b2ca4db58c368b879ce58d05c"}}}}