Re: NSTask and NSPipe has buffering issues?
Re: NSTask and NSPipe has buffering issues?
- Subject: Re: NSTask and NSPipe has buffering issues?
- From: Kyle Sluder <email@hidden>
- Date: Tue, 31 Jul 2012 19:00:16 -0700
On Jul 31, 2012, at 6:53 PM, "Mr. Gecko" <email@hidden> wrote:
>
> I can confirm if you do not stop the run loop, it will get everything… However… I cannot do this as I do not know how much data I am receiving from the task.
1) Yes, you need to run the run loop forever (NSDistantFuture).
2) You don't need to know in advance how much data you need to read. Just stop running the run loop when you're done.
3) Why are you using threads at all? You should just be able to fire off an NSTask from the main thread and let its run loop take care of notifying you.
--Kyle Sluder
_______________________________________________
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