diff --git a/ChangeLog b/ChangeLog index 02a74f94b..51a233146 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,13 @@ +2013-05-31 Richard Frith-Macdonald + + * Source/NSLock.m: ([-lockWhenCondition:beforeDate:]) + Lock mutex using -lockBeforeDate: so that we can abandon the wait + for the condition at the spacified date in the case where we can't + even obtain a lock before that date. + Fix for bug #39126 + 2013-05-29 Sebastian Reitenbach + * Headers/Foundation/NSString.h make NSStringEncoding enum typdef to NSUInteger * Source/Additions/Unicode.m diff --git a/Source/NSLock.m b/Source/NSLock.m index 3a3294be1..50ef1cd97 100644 --- a/Source/NSLock.m +++ b/Source/NSLock.m @@ -404,7 +404,10 @@ MUNLOCK - (BOOL) lockWhenCondition: (NSInteger)condition_to_meet beforeDate: (NSDate*)limitDate { - [_condition lock]; + if (NO == [_condition lockBeforeDate: limitDate]) + { + return NO; + } if (condition_to_meet == _condition_value) { return YES;