@@ -24,10 +24,11 @@ #import "OFList.h" #import "OFThread.h" #import "OFCondition.h" #import "OFSystemInfo.h" +OF_DIRECT_MEMBERS @interface OFThreadPoolJob: OFObject { id _target; SEL _selector; id _object; @@ -101,10 +102,11 @@ [_target performSelector: _selector withObject: _object]; } @end +OF_DIRECT_MEMBERS @interface OFThreadPoolThread: OFThread { OFList *_queue; OFCondition *_queueCondition, *_countCondition; @public @@ -117,11 +119,12 @@ @end @implementation OFThreadPoolThread + (instancetype)threadWithThreadPool: (OFThreadPool *)threadPool { - return [[[self alloc] initWithThreadPool: threadPool] autorelease]; + return [[(OFThreadPoolThread *)[self alloc] + initWithThreadPool: threadPool] autorelease]; } - (instancetype)initWithThreadPool: (OFThreadPool *)threadPool { self = [super init]; @@ -295,11 +298,11 @@ [_countCondition release]; [super dealloc]; } -- (void)of_dispatchJob: (OFThreadPoolJob *)job +- (void)of_dispatchJob: (OFThreadPoolJob *)job OF_DIRECT { [_countCondition lock]; _count++; [_countCondition unlock];