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.
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 ofand internally it would wait for a callback / notification which would be posted by
ARTSRRunLoopThread
after it populates itsrunLoop
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