Overview
Comment: | OFThreadPool: Fix missing autorelease pool |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
9558a93c7e8440eff5afd169fddaf77e |
User & Date: | js on 2017-05-21 21:33:24 |
Other Links: | manifest | tags |
Context
2017-05-21
| ||
23:57 | Use closesocket() instead of close() check-in: b4cd87cd81 user: js tags: trunk | |
21:33 | OFThreadPool: Fix missing autorelease pool check-in: 9558a93c7e user: js tags: trunk | |
21:28 | Prefix private methods with of_ instead of OF_ check-in: 6b77a5dd8b user: js tags: trunk | |
Changes
Modified src/OFThreadPool.m from [f1417cd36d] to [2aa1978876].
︙ | ︙ | |||
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 |