Re: Integrating NSOutputStream and NSOperation
Re: Integrating NSOutputStream and NSOperation
- Subject: Re: Integrating NSOutputStream and NSOperation
- From: Motti Shneor <email@hidden>
- Date: Tue, 17 Nov 2015 08:04:19 +0200
On Nov 13, 2015, at 6:38 AM, Motti Shneor < email@hidden> wrote:
I know NSOperationQueue has an accessor for its underlying dispatch_queue, but actual NSOperations are spawned in arbitrary threads - so I'm not sure about their dispatch_queue (if they run on a dispatch_queue at all).
The NSOperationQueue’s dispatch queue is the queue that its operations run on.
—Jens
But what that means? Will stream events be queued AFTER all pending NSOperations?
That will block (and hang) my mechanism, because my halfway-halted operation awaits the stream event (SpaceAvailable) to continue (thus blocking the operation queue) while the event is waiting down the queue for that operation to finish…
My NSOperationQueue is serial (one operation at a time) but is it blocking its dispatch_queue? I don’t know. It’s fairly easy to test, though - I think I’ll just try.
Wrapping the stream event with a high-priority NSOperation won’t help either, for the same reason.
Motti Shneor, CEO, suMac LTD. Software Development for the Macintosh
Home/Office Address: 34 Emek-Ha-Ella St. Appt.1 Modiin, ISRAEL, 71723 Home/Office Tel/Fax: +972-8-9267730
Home eMail: email@hidden Office eMail: email@hiddenMobile phone: +972-54-3136621
--- ceterum censeo microsoftiem delendam esse ---
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden