{"action":"created","issue":{"url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/46","repository_url":"https://api.github.com/repos/openid/AppAuth-iOS","labels_url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/46/comments","events_url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/46/events","html_url":"https://github.com/openid/AppAuth-iOS/issues/46","id":176966651,"number":46,"title":"Dispatching callback/completion/action blocks on the main queue is not always appropriate","user":{"login":"tpesce","id":1144032,"avatar_url":"https://avatars.githubusercontent.com/u/1144032?v=3","gravatar_id":"","url":"https://api.github.com/users/tpesce","html_url":"https://github.com/tpesce","followers_url":"https://api.github.com/users/tpesce/followers","following_url":"https://api.github.com/users/tpesce/following{/other_user}","gists_url":"https://api.github.com/users/tpesce/gists{/gist_id}","starred_url":"https://api.github.com/users/tpesce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpesce/subscriptions","organizations_url":"https://api.github.com/users/tpesce/orgs","repos_url":"https://api.github.com/users/tpesce/repos","events_url":"https://api.github.com/users/tpesce/events{/privacy}","received_events_url":"https://api.github.com/users/tpesce/received_events","type":"User","site_admin":false},"labels":[{"id":324684324,"url":"https://api.github.com/repos/openid/AppAuth-iOS/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-14T17:16:09Z","updated_at":"2016-11-23T20:15:44Z","closed_at":null,"body":"There are a few methods where callback blocks are dispatched on the main queue:\n\n```\n+ [OIDAuthorizationService discoverServiceConfigurationForDiscoveryURL:completion:]\n+ [OIDAuthorizationService performTokenRequest:callback:]\n- [OIDAuthState withFreshTokensPerformAction:]\n```\n\nThis strategy makes sense if the callback block is expected to directly perform UI updates, but this will not always be the case. In cases where the callback blocks instead perform significant computation, this behavior is generally undesirable and forces calling code to perform additional dispatching.\n\nI think it would be ideal if a mechanism could be provided to specify the queue for callback dispatch. For possible approaches, take a look at the mechanisms provided by NSURLSession and Alamofire.\n"},"comment":{"url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/comments/262620035","html_url":"https://github.com/openid/AppAuth-iOS/issues/46#issuecomment-262620035","issue_url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/46","id":262620035,"user":{"login":"WilliamDenniss","id":445150,"avatar_url":"https://avatars.githubusercontent.com/u/445150?v=3","gravatar_id":"","url":"https://api.github.com/users/WilliamDenniss","html_url":"https://github.com/WilliamDenniss","followers_url":"https://api.github.com/users/WilliamDenniss/followers","following_url":"https://api.github.com/users/WilliamDenniss/following{/other_user}","gists_url":"https://api.github.com/users/WilliamDenniss/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamDenniss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamDenniss/subscriptions","organizations_url":"https://api.github.com/users/WilliamDenniss/orgs","repos_url":"https://api.github.com/users/WilliamDenniss/repos","events_url":"https://api.github.com/users/WilliamDenniss/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamDenniss/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T20:15:44Z","updated_at":"2016-11-23T20:15:44Z","body":"My vote is for a class-level configuration setting. Hoping to avoid too many additive method definitions (similar design comment as to #28).\r\n\r\nI'd be happy to see a PR with this enhancement."}}
{"actor":{"display_login":"WilliamDenniss"}}