> On Nov 11, 2015, at 3:46 AM, Motti Shneor <su...@bezeqint.net> wrote: > > If I (upon starting my operation) schedule the outputStream on the current > operation’s runloop like thus: > > [self.outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] > forMode:NSDefaultRunLoopMode];
That won’t work because dispatch queues (other than main) and NSOperationQueues don’t have runloops. (If you call +currentRunLoop you do create a new runloop for whatever thread the queue is using, but that runloop won’t do anything because there’s no outer loop on that thread servicing it.) > If I can change the outputStream’s scheduling to use the same of my currently > running operation - that should solve my synchronizing problem. My operation > can bail safely, and be re-called on its own thread, without concurrency. You can use CFWriteStreamSetDispatchQueue to schedule the stream on a queue instead of a runloop. —Jens
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com This email sent to arch...@mail-archive.com