Re: Problem killing my threads :)
Re: Problem killing my threads :)
- Subject: Re: Problem killing my threads :)
- From: Sherm Pendley <email@hidden>
- Date: Mon, 23 Sep 2002 10:11:31 -0400
On Monday, September 23, 2002, at 09:10 AM, Dylan Neild wrote:
This makes sense. I suppose I could just have some sort of
"threadIsRunning" and "threadShouldTerminate" variables, then check for
these variables at entry points to my routines.
Anyone else see any reason why this might not be the best approach?
You may take a minor performance hit, if the "worker" thread checks for
the "threadShouldTerminate" variable with every iteration through a
loop - especially if it first obtains a lock on it, which it probably
should. I doubt it would be much of an issue, though, unless it's a very
small loop with a few bazillion repetitions.
sherm--
_______________________________________________
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.