33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
}
- (instancetype)init
{
self = [super init];
if (!of_condition_new(&_condition)) {
Class c = [self class];
[self release];
@throw [OFInitializationFailedException exceptionWithClass: c];
}
_conditionInitialized = true;
return self;
|
|
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
}
- (instancetype)init
{
self = [super init];
if (!of_condition_new(&_condition)) {
Class c = self.class;
[self release];
@throw [OFInitializationFailedException exceptionWithClass: c];
}
_conditionInitialized = true;
return self;
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
{
return of_condition_timed_wait(&_condition, &_mutex, timeInterval);
}
- (bool)waitUntilDate: (OFDate *)date
{
return of_condition_timed_wait(&_condition, &_mutex,
[date timeIntervalSinceNow]);
}
- (void)signal
{
if (!of_condition_signal(&_condition))
@throw [OFConditionSignalFailedException
exceptionWithCondition: self];
|
|
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
{
return of_condition_timed_wait(&_condition, &_mutex, timeInterval);
}
- (bool)waitUntilDate: (OFDate *)date
{
return of_condition_timed_wait(&_condition, &_mutex,
date.timeIntervalSinceNow);
}
- (void)signal
{
if (!of_condition_signal(&_condition))
@throw [OFConditionSignalFailedException
exceptionWithCondition: self];
|