diff options
Diffstat (limited to 'Foundation')
-rw-r--r-- | Foundation/GTMNSThread+Blocks.h | 6 | ||||
-rw-r--r-- | Foundation/GTMNSThread+Blocks.m | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Foundation/GTMNSThread+Blocks.h b/Foundation/GTMNSThread+Blocks.h index e3700bb..17bfbc7 100644 --- a/Foundation/GTMNSThread+Blocks.h +++ b/Foundation/GTMNSThread+Blocks.h @@ -30,10 +30,10 @@ // and this method returns immediately. // If self is the current thread, the block will be performed immediately, and // then this method will return. -- (void)gtm_performBlock:(void (^)())block; +- (void)gtm_performBlock:(void (^)(void))block; -- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)())block; -+ (void)gtm_performBlockInBackground:(void (^)())block; +- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)(void))block; ++ (void)gtm_performBlockInBackground:(void (^)(void))block; @end #endif // NS_BLOCKS_AVAILABLE diff --git a/Foundation/GTMNSThread+Blocks.m b/Foundation/GTMNSThread+Blocks.m index 4ab3ee5..8318193 100644 --- a/Foundation/GTMNSThread+Blocks.m +++ b/Foundation/GTMNSThread+Blocks.m @@ -25,11 +25,11 @@ @implementation NSThread (GTMBlocksAdditions) -+ (void)gtm_runBlockOnCurrentThread:(void (^)())block { ++ (void)gtm_runBlockOnCurrentThread:(void (^)(void))block { block(); } -- (void)gtm_performBlock:(void (^)())block { +- (void)gtm_performBlock:(void (^)(void))block { if ([[NSThread currentThread] isEqual:self]) { block(); } else { @@ -37,14 +37,14 @@ } } -- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)())block { +- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)(void))block { [NSThread performSelector:@selector(gtm_runBlockOnCurrentThread:) onThread:self withObject:[[block copy] autorelease] waitUntilDone:waitDone]; } -+ (void)gtm_performBlockInBackground:(void (^)())block { ++ (void)gtm_performBlockInBackground:(void (^)(void))block { [NSThread performSelectorInBackground:@selector(gtm_runBlockOnCurrentThread:) withObject:[[block copy] autorelease]]; } |