• 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: Setting up an auxiliary task for use with Distributed Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting up an auxiliary task for use with Distributed Objects


  • Subject: Re: Setting up an auxiliary task for use with Distributed Objects
  • From: Michael Ash <email@hidden>
  • Date: Fri, 17 Apr 2009 07:07:21 -0400

On Fri, Apr 17, 2009 at 3:10 AM, Ken Thomases <email@hidden> wrote:
> On Apr 16, 2009, at 11:12 PM, Oleg Krupnov wrote:
>
>> @Ken
>>>
>>> with something like:
>>>
>>>       while ([vendedObj shouldKeepRunning])
>>>               [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
>>> beforeDate:[NSDate distantFuture]];
>>>
>>
>> I think I've seen this code somewhere in the docs, but I haven't and I
>> still don't understand how it can terminate the run loop, if the
>> beforeDate specifies distant future? The shouldKeepRunning flag seems
>> to be checked once at the beginning and never again. Could you explain
>> how it's supposed to work?
>
> The -[NSRunLoop runMode:beforeDate:] method returns after processing a
> single firing of an input source.  So, it _can_ block until the date
> provided if nothing is happening, but if a message comes in via D.O. it will
> be processed and then control will return to the while loop.

A much simpler technique would be to simply have the DO
quit-this-process method call exit(), which will terminate the program
directly without having to fall back through the runloop.

Mike
_______________________________________________

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: 
 >Setting up an auxiliary task for use with Distributed Objects (From: Oleg Krupnov <email@hidden>)
 >Re: Setting up an auxiliary task for use with Distributed Objects (From: Ken Thomases <email@hidden>)
 >Re: Setting up an auxiliary task for use with Distributed Objects (From: Oleg Krupnov <email@hidden>)
 >Re: Setting up an auxiliary task for use with Distributed Objects (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Reading in dictionary from txt file: options for speed
  • Next by Date: Re: -[NSView lockFocus] assertion failure
  • Previous by thread: Re: Setting up an auxiliary task for use with Distributed Objects
  • Next by thread: nstoolbar in tiger
  • Index(es):
    • Date
    • Thread