ably-cocoa icon indicating copy to clipboard operation
ably-cocoa copied to clipboard

Callback-based API for fetching runloop

Open maratal opened this issue 3 years ago • 1 comments

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

┆Issue is synchronized with this Jira Task by Unito

maratal avatar Nov 30 '22 21:11 maratal

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3117

sync-by-unito[bot] avatar Nov 30 '22 21:11 sync-by-unito[bot]