Re: Techniques for thread communication
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.