165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
of_list_object_t *listObject;
if (_terminate) {
objc_autoreleasePoolPop(pool);
return nil;
}
listObject = [_queue firstListObject];
while (listObject == NULL) {
[_queueCondition wait];
if (_terminate) {
objc_autoreleasePoolPop(pool);
return nil;
}
listObject = [_queue firstListObject];
}
job = [[listObject->object retain] autorelease];
[_queue removeListObject: listObject];
} @finally {
[_queueCondition unlock];
}
|
|
|
|
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
of_list_object_t *listObject;
if (_terminate) {
objc_autoreleasePoolPop(pool);
return nil;
}
listObject = _queue.firstListObject;
while (listObject == NULL) {
[_queueCondition wait];
if (_terminate) {
objc_autoreleasePoolPop(pool);
return nil;
}
listObject = _queue.firstListObject;
}
job = [[listObject->object retain] autorelease];
[_queue removeListObject: listObject];
} @finally {
[_queueCondition unlock];
}
|