• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask and NSPipe has buffering issues?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask and NSPipe has buffering issues?


  • Subject: Re: NSTask and NSPipe has buffering issues?
  • From: "Mr. Gecko" <email@hidden>
  • Date: Tue, 31 Jul 2012 21:43:43 -0500

I need threads because the main thread is a network loop waiting for a connection and when it gets a connection, it spawns a thread like in my example. I need to be able to respond to the client with all the data from the task and I need to close out the connection and release the spawned thread/object.

I need to do this in a reasonable amount of time as well. I cannot just slow down the speed by 1 second as that makes the response to the client 1 second slower.

Do you recommend that I work with C APIs to make my own NSTask which works?

In response to number 2, how can I stop the run loop and how could I know when I got everything? I don't have any way to verify I got everything.

On Jul 31, 2012, at 9:00 PM, Kyle Sluder <email@hidden> wrote:

> 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

References: 
 >NSTask and NSPipe has buffering issues? (From: "Mr. Gecko" <email@hidden>)
 >Re: NSTask and NSPipe has buffering issues? (From: Kyle Sluder <email@hidden>)
 >Re: NSTask and NSPipe has buffering issues? (From: "Mr. Gecko" <email@hidden>)
 >Re: NSTask and NSPipe has buffering issues? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSTask and NSPipe has buffering issues?
  • Next by Date: MKMapView annotation changes not being reflected on map display. Baffling.
  • Previous by thread: Re: NSTask and NSPipe has buffering issues?
  • Next by thread: Re: NSTask and NSPipe has buffering issues?
  • Index(es):
    • Date
    • Thread