• 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: Techniques for thread communication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Techniques for thread communication


  • Subject: Re: Techniques for thread communication
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 8 Sep 2003 20:03:42 -0500

On Monday, September 8, 2003, at 12:56 PM, Eric Scharff wrote:
Perhaps I should describe my thread example in more detail. I
have a worker thread that continuously searches an input space
using standard techniques like simulated annealing, genetic
algorithms, etc. The worker thread has a concept of the "best
found so far" which it stores in an instance varable.

You could probably just put your found result in a shared queue (easy to create using NSMutableArray and NSConditionLock) and then use -performSelectorInMainThread: to let your main thread know that something's been added to the queue.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Techniques for thread communication (From: Eric Scharff <email@hidden>)

  • Prev by Date: Re: NSUserDefaults causing me fits
  • Next by Date: Re: NSUserDefaults causing me fits
  • Previous by thread: Re: Techniques for thread communication
  • Next by thread: Re: Techniques for thread communication
  • Index(es):
    • Date
    • Thread