On Oct 20, 2014, at 3:54 AM, Quinn The Eskimo! <eski...@apple.com> wrote:

> On 18 Oct 2014, at 22:09, Daryle Walker <dary...@mac.com> wrote:
> 
>> Or can the threading NSOperationQueue uses be controlled in a way compatible 
>> with NSURLProtocolClient?
> 
> That depends on how you implement your NSOperations.  A concurrent 
> NSOperation has good control over its threading (for example, QHTTPOperation 
> > QRunLoopOperation [1]).  A standard operation has to run on the thread 
> that's allocated to it by the queue.
> 
> Again, this all comes back to you underlying asynchrony.  If that's run loop 
> based, it's a good match for NSURLProtocol.  For example, if you want to 
> transport requests over NSStream, you could easily create an NSOperation 
> based on QRunLoopOperation and there would be very little impedance mismatch. 
>  The situation with other APIs depends on the API.
> 
> [1] Part of the LinkedImageFetcher sample code.
> 
> <https://developer.apple.com/library/mac/#samplecode/LinkedImageFetcher/>

Over the weekend, I read the Programming Guide corresponding to NSThread. I 
just used one of the -performSelector: APIs. Easier than I anticipated, except 
for the fact the code isn’t working right now. (That’s on the general Cocoa 
list. Should I ask here too?)

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 


 _______________________________________________
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

Reply via email to