Re: Question about Threading
Re: Question about Threading
- Subject: Re: Question about Threading
- From: Dominic Yu <email@hidden>
- Date: Wed, 10 Aug 2005 11:53:46 -0700
2005/8/10, Chris Kane <email@hidden>:
> Don't, however, try to solve the synchronization and "wait until the
> background thread is done" by locking a lock in one thread which the
> other thread unlocks.
wait... are you saying that using a BOOL and an NSLock is not OK? for example
- (void)someThread:(id)anObj {
[aLock lock];
while (aBool) {
// do stuff
}
[aLock unlock];
}
- (void)stopAboveThread:(id)sender {
aBool = NO;
[aLock lock];
// do some other stuff
[aLock unlock];
}
Is this incorrrect code?
-Dominic
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden