Differences From 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]
To Artifact [2aa1978876]:
- File src/OFThreadPool.m — part of check-in [9558a93c7e] at 2017-05-21 21:33:24 on branch trunk — OFThreadPool: Fix missing autorelease pool (user: js, size: 6396) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
29 30 31 32 33 34 35 | SEL _selector; id _object; #ifdef OF_HAVE_BLOCKS of_thread_pool_block_t _block; #endif } | < < < < < < < < < < < < < < < < < < < < < < | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | SEL _selector; id _object; #ifdef OF_HAVE_BLOCKS of_thread_pool_block_t _block; #endif } - initWithTarget: (id)target selector: (SEL)selector object: (id)object; #ifdef OF_HAVE_BLOCKS - initWithBlock: (of_thread_pool_block_t)block; #endif - (void)perform; @end @implementation OFThreadPoolJob - initWithTarget: (id)target selector: (SEL)selector object: (id)object { self = [super init]; @try { |
︙ | ︙ | |||
346 347 348 349 350 351 352 | } } - (void)dispatchWithTarget: (id)target selector: (SEL)selector object: (id)object { | | | | > > > > > > > | > > > | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | } } - (void)dispatchWithTarget: (id)target selector: (SEL)selector object: (id)object { OFThreadPoolJob *job = [[OFThreadPoolJob alloc] initWithTarget: target selector: selector object: object]; @try { [self of_dispatchJob: job]; } @finally { [job release]; } } #ifdef OF_HAVE_BLOCKS - (void)dispatchWithBlock: (of_thread_pool_block_t)block { OFThreadPoolJob *job = [[OFThreadPoolJob alloc] initWithBlock: block]; @try { [self of_dispatchJob: job]; } @finally { [job release]; } } #endif - (size_t)size { return _size; } @end |