@@ -131,12 +131,12 @@ * Nasty workaround for thread implementations which can't return a * pointer on join, or don't have a way to exit a thread. */ if (setjmp(thread->_exitEnv) == 0) { # ifdef OF_HAVE_BLOCKS - if (thread->_threadBlock != NULL) - thread->_returnValue = [thread->_threadBlock() retain]; + if (thread->_block != NULL) + thread->_returnValue = [thread->_block() retain]; else # endif thread->_returnValue = [[thread main] retain]; } @@ -158,11 +158,11 @@ [thread release]; } @synthesize name = _name; # ifdef OF_HAVE_BLOCKS -@synthesize threadBlock = _threadBlock; +@synthesize block = _block; # endif + (void)initialize { if (self != [OFThread class]) @@ -177,13 +177,13 @@ { return [[[self alloc] init] autorelease]; } # ifdef OF_HAVE_BLOCKS -+ (instancetype)threadWithThreadBlock: (OFThreadBlock)threadBlock ++ (instancetype)threadWithBlock: (OFThreadBlock)block { - return [[[self alloc] initWithThreadBlock: threadBlock] autorelease]; + return [[[self alloc] initWithBlock: block] autorelease]; } # endif + (OFThread *)currentThread { @@ -378,16 +378,16 @@ return self; } # ifdef OF_HAVE_BLOCKS -- (instancetype)initWithThreadBlock: (OFThreadBlock)threadBlock +- (instancetype)initWithBlock: (OFThreadBlock)block { self = [self init]; @try { - _threadBlock = [threadBlock copy]; + _block = [block copy]; } @catch (id e) { [self release]; @throw e; } @@ -541,11 +541,11 @@ if (_running == OFThreadStateWaitingForJoin) OFPlainThreadDetach(_thread); [_returnValue release]; # ifdef OF_HAVE_BLOCKS - [_threadBlock release]; + [_block release]; # endif [super dealloc]; } #else