ably-cocoa
ably-cocoa copied to clipboard
Callback-based API for fetching runloop
What about if we made this a callback-based API instead, which, as well as not blocking, encapsulates the logic of waiting for the shared ARTSRRunLoopThread to start? Along the lines of
+ (void)ARTSR_fetchNetworkRunLoopWithCompletion:(void (^)())completionHandler queue:(dispatch_queue_t)callbackQueue /* the queue on which completionHandler should be called */;
and internally it would wait for a callback / notification which would be posted by ARTSRRunLoopThread after it populates its runLoop inside its -main method.
Originally posted by @lawrence-forooghian in https://github.com/ably/ably-cocoa/pull/1538#discussion_r1035062291
➤ Automation for Jira commented:
The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3117