mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
b6159c95bc
commit
f4ab1c1264
1 changed files with 5 additions and 6 deletions
|
@ -372,17 +372,16 @@ MUNLOCK
|
||||||
- (BOOL) lockWhenCondition: (NSInteger)condition_to_meet
|
- (BOOL) lockWhenCondition: (NSInteger)condition_to_meet
|
||||||
beforeDate: (NSDate*)limitDate
|
beforeDate: (NSDate*)limitDate
|
||||||
{
|
{
|
||||||
|
BOOL ret;
|
||||||
[_condition lock];
|
[_condition lock];
|
||||||
if (condition_to_meet == _condition_value)
|
if (condition_to_meet == _condition_value)
|
||||||
{
|
{
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
if ([_condition waitUntilDate: limitDate]
|
ret = [_condition waitUntilDate: limitDate]
|
||||||
&& (condition_to_meet == _condition_value))
|
&& (condition_to_meet == _condition_value);
|
||||||
{
|
[_condition unlock];
|
||||||
return YES;
|
return ret;
|
||||||
}
|
|
||||||
return NO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MNAME
|
MNAME
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue