Re: NSTask oddity with getting stdout
Re: NSTask oddity with getting stdout
- Subject: Re: NSTask oddity with getting stdout
- From: Scott Ribe <email@hidden>
- Date: Mon, 25 Jul 2011 09:14:09 -0600
On Jul 25, 2011, at 3:40 AM, Shane Stanley wrote:
>> I wonder if they've changed how the readInBackgroundAndNotify works.
>
> Yes, they have. I logged a bug on it, and was told that the way it worked in
> 10.6 was wrong -- whereas it used not to send a notification until there was
> something to read, it now returns one immediately regardless. Whether that's
> the problem here, I don't know.
That's absolutely demented. If it sends a notification immediately, with or without data, then you're never really using it to read in the background, you're almost just spinning in a busy loop, getting a probably empty NSData, and calling readInBackgroundAndNotify again, as fast as the runloop can deliver the notifications.
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden