• 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: Cocoa idiom for time consuming tasks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa idiom for time consuming tasks


  • Subject: Re: Cocoa idiom for time consuming tasks
  • From: "Mike Davis" <email@hidden>
  • Date: Mon, 4 Feb 2002 00:46:46 -0500

In Only Mortal and in ViaVoice I push long tasks into a thread using the
command pattern. For stopping the commands in the queue, I remove the
waiting commands and "cancel" the current command. I use cancelable threads.

To call back to the main thread, from the command, I use a NSConnection. The
docs for NSConnection have an example, though you'll need to do some more to
make it useful in a real application. Add in a timeout on the connection,
both ends, and exception handling.


  • Prev by Date: Re: reading in text files
  • Next by Date: Re: reading in text files
  • Previous by thread: Cocoa idiom for time consuming tasks
  • Next by thread: Re: Cocoa idiom for time consuming tasks
  • Index(es):
    • Date
    • Thread