{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/comments/118320871","pull_request_review_id":40101683,"id":118320871,"diff_hunk":"@@ -43,12 +43,11 @@ public sealed class Channel : IChannelUnit\n             _batchScheduled = false;\n             _enabled = true;\n             DeviceInformationHelper.InformationInvalidated += (sender, e) => InvalidateDeviceCache();\n-            Task.Run(CountFromDiskAsync);","path":"SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs","position":19,"original_position":4,"commit_id":"e8f6c23fafb1c050ded591049109ff7a573ce1a1","original_commit_id":"dd7a5eeae56e377578f0f9d982da0686823bf74c","user":{"login":"achocron","id":5619585,"avatar_url":"https://avatars3.githubusercontent.com/u/5619585?v=3","gravatar_id":"","url":"https://api.github.com/users/achocron","html_url":"https://github.com/achocron","followers_url":"https://api.github.com/users/achocron/followers","following_url":"https://api.github.com/users/achocron/following{/other_user}","gists_url":"https://api.github.com/users/achocron/gists{/gist_id}","starred_url":"https://api.github.com/users/achocron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achocron/subscriptions","organizations_url":"https://api.github.com/users/achocron/orgs","repos_url":"https://api.github.com/users/achocron/repos","events_url":"https://api.github.com/users/achocron/events{/privacy}","received_events_url":"https://api.github.com/users/achocron/received_events","type":"User","site_admin":false},"body":"I'm confused because we enter channel in an enabled state and start using it without ever calling `ResumeAsync`. Should this be invoked when it is created? And if so, how will you ensure that it is called first? Perhaps create the mutex in a locked state, and then unlock it at the end of an initialization function (that doesn't lock it but assumes mutex is already locked)","created_at":"2017-05-24T17:50:18Z","updated_at":"2017-05-24T17:50:18Z","html_url":"https://github.com/Microsoft/mobile-center-sdk-dotnet/pull/317#discussion_r118320871","pull_request_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/comments/118320871"},"html":{"href":"https://github.com/Microsoft/mobile-center-sdk-dotnet/pull/317#discussion_r118320871"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317","id":121762960,"html_url":"https://github.com/Microsoft/mobile-center-sdk-dotnet/pull/317","diff_url":"https://github.com/Microsoft/mobile-center-sdk-dotnet/pull/317.diff","patch_url":"https://github.com/Microsoft/mobile-center-sdk-dotnet/pull/317.patch","issue_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/issues/317","number":317,"state":"open","locked":false,"title":"Make internal APIs that do work on background threads return tasks","user":{"login":"MatkovIvan","id":1836384,"avatar_url":"https://avatars2.githubusercontent.com/u/1836384?v=3","gravatar_id":"","url":"https://api.github.com/users/MatkovIvan","html_url":"https://github.com/MatkovIvan","followers_url":"https://api.github.com/users/MatkovIvan/followers","following_url":"https://api.github.com/users/MatkovIvan/following{/other_user}","gists_url":"https://api.github.com/users/MatkovIvan/gists{/gist_id}","starred_url":"https://api.github.com/users/MatkovIvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatkovIvan/subscriptions","organizations_url":"https://api.github.com/users/MatkovIvan/orgs","repos_url":"https://api.github.com/users/MatkovIvan/repos","events_url":"https://api.github.com/users/MatkovIvan/events{/privacy}","received_events_url":"https://api.github.com/users/MatkovIvan/received_events","type":"User","site_admin":false},"body":"- `Channel.SetEnabled` -> `Channel.SetEnabledAsync`;\r\n- `Channel.Shutdown` -> `Channel.ShutdownAsync`;\r\n- `Channel.Enqueue` -> `Channel.EnqueueAsync`;\r\n- Ignore `StatefulMutexException` in `Channel.CountFromDiskAsync`;\r\n- Call `CountLogs` on channel enable;\r\n- `ServiceCall.Execute` -> `ServiceCall.ExecuteAsync`;\r\n- Use async task instead `ServiceCallSucceededCallback`/ `ServiceCallFailedCallback ` in `IServiceCall`. This allows simplify tests;\r\n","created_at":"2017-05-22T12:12:23Z","updated_at":"2017-05-24T17:50:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1d2702203fd32b98bef4b176d39504fe6c0acd5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317/commits","review_comments_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317/comments","review_comment_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/issues/317/comments","statuses_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/statuses/e8f6c23fafb1c050ded591049109ff7a573ce1a1","head":{"label":"akvelon:feature/async-intarnal-api","ref":"feature/async-intarnal-api","sha":"e8f6c23fafb1c050ded591049109ff7a573ce1a1","user":{"login":"akvelon","id":5629232,"avatar_url":"https://avatars3.githubusercontent.com/u/5629232?v=3","gravatar_id":"","url":"https://api.github.com/users/akvelon","html_url":"https://github.com/akvelon","followers_url":"https://api.github.com/users/akvelon/followers","following_url":"https://api.github.com/users/akvelon/following{/other_user}","gists_url":"https://api.github.com/users/akvelon/gists{/gist_id}","starred_url":"https://api.github.com/users/akvelon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvelon/subscriptions","organizations_url":"https://api.github.com/users/akvelon/orgs","repos_url":"https://api.github.com/users/akvelon/repos","events_url":"https://api.github.com/users/akvelon/events{/privacy}","received_events_url":"https://api.github.com/users/akvelon/received_events","type":"Organization","site_admin":false},"repo":{"id":89464387,"name":"mobile-center-sdk-dotnet","full_name":"akvelon/mobile-center-sdk-dotnet","owner":{"login":"akvelon","id":5629232,"avatar_url":"https://avatars3.githubusercontent.com/u/5629232?v=3","gravatar_id":"","url":"https://api.github.com/users/akvelon","html_url":"https://github.com/akvelon","followers_url":"https://api.github.com/users/akvelon/followers","following_url":"https://api.github.com/users/akvelon/following{/other_user}","gists_url":"https://api.github.com/users/akvelon/gists{/gist_id}","starred_url":"https://api.github.com/users/akvelon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvelon/subscriptions","organizations_url":"https://api.github.com/users/akvelon/orgs","repos_url":"https://api.github.com/users/akvelon/repos","events_url":"https://api.github.com/users/akvelon/events{/privacy}","received_events_url":"https://api.github.com/users/akvelon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akvelon/mobile-center-sdk-dotnet","description":"Development repository for the Mobile Center SDK for .NET platforms, including Xamarin","fork":true,"url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet","forks_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/forks","keys_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/teams","hooks_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/hooks","issue_events_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/events","assignees_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/tags","blobs_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/languages","stargazers_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/stargazers","contributors_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/contributors","subscribers_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/subscribers","subscription_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/subscription","commits_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/merges","archive_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/downloads","issues_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/akvelon/mobile-center-sdk-dotnet/deployments","created_at":"2017-04-26T09:41:38Z","updated_at":"2017-04-26T09:41:40Z","pushed_at":"2017-05-24T16:37:10Z","git_url":"git://github.com/akvelon/mobile-center-sdk-dotnet.git","ssh_url":"git@github.com:akvelon/mobile-center-sdk-dotnet.git","clone_url":"https://github.com/akvelon/mobile-center-sdk-dotnet.git","svn_url":"https://github.com/akvelon/mobile-center-sdk-dotnet","homepage":"","size":2737,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"develop"}},"base":{"label":"Microsoft:develop","ref":"develop","sha":"632af23d9c5478b7cf1449f361b16da524861e32","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars1.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":68050204,"name":"mobile-center-sdk-dotnet","full_name":"Microsoft/mobile-center-sdk-dotnet","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars1.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/mobile-center-sdk-dotnet","description":"Development repository for the Mobile Center SDK for .NET platforms, including Xamarin","fork":false,"url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet","forks_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/forks","keys_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/teams","hooks_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/events","assignees_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/tags","blobs_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/languages","stargazers_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/subscription","commits_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/merges","archive_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/downloads","issues_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/deployments","created_at":"2016-09-12T21:35:31Z","updated_at":"2017-05-19T10:57:57Z","pushed_at":"2017-05-24T17:04:25Z","git_url":"git://github.com/Microsoft/mobile-center-sdk-dotnet.git","ssh_url":"git@github.com:Microsoft/mobile-center-sdk-dotnet.git","clone_url":"https://github.com/Microsoft/mobile-center-sdk-dotnet.git","svn_url":"https://github.com/Microsoft/mobile-center-sdk-dotnet","homepage":"","size":2878,"stargazers_count":39,"watchers_count":39,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":6,"forks":20,"open_issues":6,"watchers":39,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317"},"html":{"href":"https://github.com/Microsoft/mobile-center-sdk-dotnet/pull/317"},"issue":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/issues/317"},"comments":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/issues/317/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/pulls/317/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/mobile-center-sdk-dotnet/statuses/e8f6c23fafb1c050ded591049109ff7a573ce1a1"}}}}
{"actor":{"display_login":"achocron"}}