mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
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:
parent
77a7398d4a
commit
1874665069
1 changed files with 5 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue