On Jan 17, 2013, at 2:09 AM, Charles Srstka <cocoa...@charlessoft.com> wrote:

> You could start a run loop in a dispatch queue, schedule the NSInputStream on 
> that runloop, and then have the delegate methods block/unblock your reading 
> thread via a lock/semaphore/etc.

Do not start a runloop in a block submitted to a dispatch queue. You do not own 
the thread that your block is executing on, therefore you should not mutate 
thread state. For all you know, if you dispatch_async from a background thread, 
your block will execute on the main thread.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to