@@ -31,15 +31,15 @@ #ifdef OF_HAVE_BLOCKS of_thread_pool_block_t block; #endif } -+ jobWithTarget: (id)target - selector: (SEL)selector - object: (id)object; ++ (instancetype)jobWithTarget: (id)target + selector: (SEL)selector + object: (id)object; #ifdef OF_HAVE_BLOCKS -+ jobWithBlock: (of_thread_pool_block_t)block; ++ (instancetype)jobWithBlock: (of_thread_pool_block_t)block; #endif - initWithTarget: (id)target selector: (SEL)selector object: (id)object; #ifdef OF_HAVE_BLOCKS @@ -47,21 +47,21 @@ #endif - (void)perform; @end @implementation OFThreadPoolJob -+ jobWithTarget: (id)target - selector: (SEL)selector - object: (id)object ++ (instancetype)jobWithTarget: (id)target + selector: (SEL)selector + object: (id)object { return [[[self alloc] initWithTarget: target selector: selector object: object] autorelease]; } #ifdef OF_HAVE_BLOCKS -+ jobWithBlock: (of_thread_pool_block_t)block ++ (instancetype)jobWithBlock: (of_thread_pool_block_t)block { return [[(OFThreadPoolJob*)[self alloc] initWithBlock: block] autorelease]; } #endif @@ -130,16 +130,16 @@ @public volatile BOOL terminate; volatile int *doneCount; } -+ threadWithThreadPool: (OFThreadPool*)threadPool; ++ (instancetype)threadWithThreadPool: (OFThreadPool*)threadPool; - initWithThreadPool: (OFThreadPool*)threadPool; @end @implementation OFThreadPoolThread -+ threadWithThreadPool: (OFThreadPool*)threadPool ++ (instancetype)threadWithThreadPool: (OFThreadPool*)threadPool { return [[[self alloc] initWithThreadPool: threadPool] autorelease]; } - initWithThreadPool: (OFThreadPool*)threadPool @@ -239,16 +239,16 @@ } } @end @implementation OFThreadPool -+ threadPool ++ (instancetype)threadPool { return [[[self alloc] init] autorelease]; } -+ threadPoolWithSize: (size_t)size ++ (instancetype)threadPoolWithSize: (size_t)size { return [[[self alloc] initWithSize: size] autorelease]; } - init