Differences From Artifact [04406d7334]:
- File
src/OFThreadPool.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 6799) [annotate] [blame] [check-ins using]
To Artifact [f1417cd36d]:
- File
src/OFThreadPool.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 6799) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
312 313 314 315 316 317 318 | [_queue release]; [_queueCondition release]; [_countCondition release]; [super dealloc]; } | | | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
[_queue release];
[_queueCondition release];
[_countCondition release];
[super dealloc];
}
- (void)of_dispatchJob: (OFThreadPoolJob *)job
{
[_countCondition lock];
_count++;
[_countCondition unlock];
[_queueCondition lock];
@try {
|
| ︙ | ︙ | |||
346 347 348 349 350 351 352 |
}
}
- (void)dispatchWithTarget: (id)target
selector: (SEL)selector
object: (id)object
{
| | | | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
}
}
- (void)dispatchWithTarget: (id)target
selector: (SEL)selector
object: (id)object
{
[self of_dispatchJob: [OFThreadPoolJob jobWithTarget: target
selector: selector
object: object]];
}
#ifdef OF_HAVE_BLOCKS
- (void)dispatchWithBlock: (of_thread_pool_block_t)block
{
[self of_dispatchJob: [OFThreadPoolJob jobWithBlock: block]];
}
#endif
- (size_t)size
{
return _size;
}
@end
|