• 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: [long] Re: Running processes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [long] Re: Running processes


  • Subject: Re: [long] Re: Running processes
  • From: "Tom Harrington" <email@hidden>
  • Date: Tue, 12 Sep 2006 10:48:54 -0600

On 9/12/06, Development <email@hidden> wrote:
     [task launch];

     [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(printTaskOutput:)
name:NSFileHandleReadCompletionNotification object:[[task
standardOutput] fileHandleForReading]];

You've got a race condition here, and you're losing the race. As soon as you launch the task, it can start producing output. But you're not even listening for the output yet! Some of it may well go by before you get your notification handler installed.

--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Running processes (From: Development <email@hidden>)
 >Re: Running processes (From: Wain <email@hidden>)
 >Re: Running processes (From: Development <email@hidden>)
 >Re: Running processes (From: "I. Savant" <email@hidden>)
 >[long] Re: Running processes (From: Development <email@hidden>)

  • Prev by Date: Re: [long] Re: Running processes
  • Next by Date: Cocoaheads Lake Forest, CA, 7pm tonight!
  • Previous by thread: Re: [long] Re: Running processes
  • Next by thread: Re: [long] Re: Running processes
  • Index(es):
    • Date
    • Thread