On Nov 8, 2009, at 2:17 AM, Roland King wrote:
Or look at NSOperation/NSOperationQueue which absolves you of the
need to care about threads, it's done for you (and I believe makes
use of Grand Central Dispatch on current versions of OSX). Just
package up whatever it is you need to do and s
Many thanks to all who helped with this. I've had some very useful
discussion off-list with Roland King and I'm on my way to threading
nirvana.
Ron
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or modera
On 08-Nov-2009, at 5:37 PM, Ron Fleckner wrote:
Hi Greg, thanks for the link.
I think I've learned that the effect of pausing a thread can be just
as easily and more safely achieved by simply stopping it depending
on a BOOL on the main thread. Yes? So, in my situation, I would
send
On 08/11/2009, at 4:34 PM, Greg Guerin wrote:
Ron Fleckner wrote:
I've finally worked out a way to pause a thread and would like to
know if what I'm doing is dangerous or bad or...?
Exactly what problem are you trying to solve?
Pausing a thread is always potentially dangerous. Any locks
Ron Fleckner wrote:
I've finally worked out a way to pause a thread and would like to
know if what I'm doing is dangerous or bad or...?
Exactly what problem are you trying to solve?
Pausing a thread is always potentially dangerous. Any locks or
@synchronized blocks acquired before reachin
On 08/11/2009, at 2:36 PM, Dave DeLong wrote:
Instead of a BOOL on the main thread, what about an NSLock? Start
off by locking it on the main thread, and then the secondary thread
can try to lock it, block (because it can't acquire the lock since
the main thread has it), and not resume un
On Sat, Nov 7, 2009 at 7:28 PM, Ron Fleckner wrote:
> This is a small proof-of-concept/test kind of project. I've had a look at
> NSConditionLock, but I don't get the concepts. So I've got this naïve
> solution, which is a kind of polling, I know, but it _seems_ to work quite
> well. The CPU usa
Instead of a BOOL on the main thread, what about an NSLock? Start off
by locking it on the main thread, and then the secondary thread can
try to lock it, block (because it can't acquire the lock since the
main thread has it), and not resume until the main thread unlocks it
(equivalent to t