{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments/95929855","pull_request_review_id":16500929,"id":95929855,"diff_hunk":"@@ -735,31 +739,37 @@ - (void)testStreamingUploadNotifier {\n     __block NSInteger callCount = 0;\n     __block NSUInteger transferred = 0;\n     __block NSUInteger transferrable = 0;\n-    dispatch_queue_t queue = dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0);\n     // Open the Realm\n     RLMRealm *realm = [self openRealmForURL:url user:user];\n     NSLock *lock = [[NSLock alloc] init];\n     // Register a notifier.\n     RLMSyncSession *session = [user sessionForURL:url];\n     XCTAssertNotNil(session);\n-    RLMProgressNotificationToken *token = [session addProgressNotificationBlock:^(NSUInteger xfr, NSUInteger xfb) {\n-        [lock lockBeforeDate:[NSDate distantFuture]];\n-        // Make sure the values are increasing, and update our stored copies.\n-        XCTAssert(xfr >= transferred);\n-        XCTAssert(xfb >= transferrable);\n-        transferred = xfr;\n-        transferrable = xfb;\n-        callCount++;\n-        [lock unlock];\n-    } direction:RLMSyncNotifierDirectionUpload mode:RLMSyncNotifierModeAlwaysReportLatest queue:queue];\n+    __block RLMProgressNotificationToken *token;\n+    XCTestExpectation *ex = [self expectationWithDescription:@\"token expectation\"];\n+    dispatch_async(dispatch_get_main_queue(), ^{\n+        token = [session addProgressNotificationBlock:^(NSUInteger xfr, NSUInteger xfb) {\n+            [lock lockBeforeDate:[NSDate distantFuture]];","path":"Realm/ObjectServerTests/RLMObjectServerTests.m","position":80,"original_position":87,"commit_id":"c052e845d6a1fe1ff3db4f17ab05242b4c129807","original_commit_id":"c052e845d6a1fe1ff3db4f17ab05242b4c129807","user":{"login":"bdash","id":54825,"avatar_url":"https://avatars.githubusercontent.com/u/54825?v=3","gravatar_id":"","url":"https://api.github.com/users/bdash","html_url":"https://github.com/bdash","followers_url":"https://api.github.com/users/bdash/followers","following_url":"https://api.github.com/users/bdash/following{/other_user}","gists_url":"https://api.github.com/users/bdash/gists{/gist_id}","starred_url":"https://api.github.com/users/bdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdash/subscriptions","organizations_url":"https://api.github.com/users/bdash/orgs","repos_url":"https://api.github.com/users/bdash/repos","events_url":"https://api.github.com/users/bdash/events{/privacy}","received_events_url":"https://api.github.com/users/bdash/received_events","type":"User","site_admin":false},"body":"Then again, this block should be invoked on the main thread so the locking looks to be unnecessary.","created_at":"2017-01-13T02:51:34Z","updated_at":"2017-01-13T02:57:32Z","html_url":"https://github.com/realm/realm-cocoa/pull/4535#discussion_r95929855","pull_request_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments/95929855"},"html":{"href":"https://github.com/realm/realm-cocoa/pull/4535#discussion_r95929855"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535","id":101174031,"html_url":"https://github.com/realm/realm-cocoa/pull/4535","diff_url":"https://github.com/realm/realm-cocoa/pull/4535.diff","patch_url":"https://github.com/realm/realm-cocoa/pull/4535.patch","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4535","number":4535,"state":"open","locked":false,"title":"Add support for progress notifiers","user":{"login":"austinzheng","id":3687054,"avatar_url":"https://avatars.githubusercontent.com/u/3687054?v=3","gravatar_id":"","url":"https://api.github.com/users/austinzheng","html_url":"https://github.com/austinzheng","followers_url":"https://api.github.com/users/austinzheng/followers","following_url":"https://api.github.com/users/austinzheng/following{/other_user}","gists_url":"https://api.github.com/users/austinzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/austinzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinzheng/subscriptions","organizations_url":"https://api.github.com/users/austinzheng/orgs","repos_url":"https://api.github.com/users/austinzheng/repos","events_url":"https://api.github.com/users/austinzheng/events{/privacy}","received_events_url":"https://api.github.com/users/austinzheng/received_events","type":"User","site_admin":false},"body":"Replaces https://github.com/realm/realm-cocoa/pull/4509.\r\n\r\nTODO:\r\n- API discussion\r\n- Binding-level tests","created_at":"2017-01-12T00:16:15Z","updated_at":"2017-01-13T02:57:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"716ed3e191d2b8567f20bfc1065cbfb034d39f2e","assignee":{"login":"austinzheng","id":3687054,"avatar_url":"https://avatars.githubusercontent.com/u/3687054?v=3","gravatar_id":"","url":"https://api.github.com/users/austinzheng","html_url":"https://github.com/austinzheng","followers_url":"https://api.github.com/users/austinzheng/followers","following_url":"https://api.github.com/users/austinzheng/following{/other_user}","gists_url":"https://api.github.com/users/austinzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/austinzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinzheng/subscriptions","organizations_url":"https://api.github.com/users/austinzheng/orgs","repos_url":"https://api.github.com/users/austinzheng/repos","events_url":"https://api.github.com/users/austinzheng/events{/privacy}","received_events_url":"https://api.github.com/users/austinzheng/received_events","type":"User","site_admin":false},"assignees":[{"login":"austinzheng","id":3687054,"avatar_url":"https://avatars.githubusercontent.com/u/3687054?v=3","gravatar_id":"","url":"https://api.github.com/users/austinzheng","html_url":"https://github.com/austinzheng","followers_url":"https://api.github.com/users/austinzheng/followers","following_url":"https://api.github.com/users/austinzheng/following{/other_user}","gists_url":"https://api.github.com/users/austinzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/austinzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinzheng/subscriptions","organizations_url":"https://api.github.com/users/austinzheng/orgs","repos_url":"https://api.github.com/users/austinzheng/repos","events_url":"https://api.github.com/users/austinzheng/events{/privacy}","received_events_url":"https://api.github.com/users/austinzheng/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535/commits","review_comments_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535/comments","review_comment_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4535/comments","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/c052e845d6a1fe1ff3db4f17ab05242b4c129807","head":{"label":"realm:az/sync-progress-notifications","ref":"az/sync-progress-notifications","sha":"c052e845d6a1fe1ff3db4f17ab05242b4c129807","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4044891,"name":"realm-cocoa","full_name":"realm/realm-cocoa","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-cocoa","description":"Realm is a mobile database: a replacement for Core Data & SQLite","fork":false,"url":"https://api.github.com/repos/realm/realm-cocoa","forks_url":"https://api.github.com/repos/realm/realm-cocoa/forks","keys_url":"https://api.github.com/repos/realm/realm-cocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-cocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-cocoa/teams","hooks_url":"https://api.github.com/repos/realm/realm-cocoa/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-cocoa/events","assignees_url":"https://api.github.com/repos/realm/realm-cocoa/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-cocoa/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-cocoa/tags","blobs_url":"https://api.github.com/repos/realm/realm-cocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-cocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-cocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-cocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-cocoa/languages","stargazers_url":"https://api.github.com/repos/realm/realm-cocoa/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-cocoa/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-cocoa/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-cocoa/subscription","commits_url":"https://api.github.com/repos/realm/realm-cocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-cocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-cocoa/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-cocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-cocoa/merges","archive_url":"https://api.github.com/repos/realm/realm-cocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-cocoa/downloads","issues_url":"https://api.github.com/repos/realm/realm-cocoa/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-cocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-cocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-cocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-cocoa/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-cocoa/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-cocoa/deployments","created_at":"2012-04-16T20:06:56Z","updated_at":"2017-01-13T02:12:38Z","pushed_at":"2017-01-13T02:42:12Z","git_url":"git://github.com/realm/realm-cocoa.git","ssh_url":"git@github.com:realm/realm-cocoa.git","clone_url":"https://github.com/realm/realm-cocoa.git","svn_url":"https://github.com/realm/realm-cocoa","homepage":"https://realm.io","size":49548,"stargazers_count":9654,"watchers_count":9654,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1202,"mirror_url":null,"open_issues_count":261,"forks":1202,"open_issues":261,"watchers":9654,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"5b1db286781151bbd774a2dfc864a0eaa5ad7593","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4044891,"name":"realm-cocoa","full_name":"realm/realm-cocoa","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-cocoa","description":"Realm is a mobile database: a replacement for Core Data & SQLite","fork":false,"url":"https://api.github.com/repos/realm/realm-cocoa","forks_url":"https://api.github.com/repos/realm/realm-cocoa/forks","keys_url":"https://api.github.com/repos/realm/realm-cocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-cocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-cocoa/teams","hooks_url":"https://api.github.com/repos/realm/realm-cocoa/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-cocoa/events","assignees_url":"https://api.github.com/repos/realm/realm-cocoa/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-cocoa/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-cocoa/tags","blobs_url":"https://api.github.com/repos/realm/realm-cocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-cocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-cocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-cocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-cocoa/languages","stargazers_url":"https://api.github.com/repos/realm/realm-cocoa/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-cocoa/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-cocoa/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-cocoa/subscription","commits_url":"https://api.github.com/repos/realm/realm-cocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-cocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-cocoa/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-cocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-cocoa/merges","archive_url":"https://api.github.com/repos/realm/realm-cocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-cocoa/downloads","issues_url":"https://api.github.com/repos/realm/realm-cocoa/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-cocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-cocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-cocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-cocoa/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-cocoa/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-cocoa/deployments","created_at":"2012-04-16T20:06:56Z","updated_at":"2017-01-13T02:12:38Z","pushed_at":"2017-01-13T02:42:12Z","git_url":"git://github.com/realm/realm-cocoa.git","ssh_url":"git@github.com:realm/realm-cocoa.git","clone_url":"https://github.com/realm/realm-cocoa.git","svn_url":"https://github.com/realm/realm-cocoa","homepage":"https://realm.io","size":49548,"stargazers_count":9654,"watchers_count":9654,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1202,"mirror_url":null,"open_issues_count":261,"forks":1202,"open_issues":261,"watchers":9654,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535"},"html":{"href":"https://github.com/realm/realm-cocoa/pull/4535"},"issue":{"href":"https://api.github.com/repos/realm/realm-cocoa/issues/4535"},"comments":{"href":"https://api.github.com/repos/realm/realm-cocoa/issues/4535/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/4535/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-cocoa/statuses/c052e845d6a1fe1ff3db4f17ab05242b4c129807"}}}}
{"actor":{"display_login":"bdash"}}