Fixed bug in -lockWhenCondition:beforeDate: (was not releasing mutex correctly).

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28752 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2009-09-30 12:40:00 +00:00
parent 77a7398d4a
commit 1874665069

View file

@ -372,17 +372,16 @@ MUNLOCK
- (BOOL) lockWhenCondition: (NSInteger)condition_to_meet
beforeDate: (NSDate*)limitDate
{
BOOL ret;
[_condition lock];
if (condition_to_meet == _condition_value)
{
return YES;
}
if ([_condition waitUntilDate: limitDate]
&& (condition_to_meet == _condition_value))
{
return YES;
}
return NO;
ret = [_condition waitUntilDate: limitDate]
&& (condition_to_meet == _condition_value);
[_condition unlock];
return ret;
}
MNAME