Permalink
Browse files

Documentation.

  • Loading branch information...
1 parent 170f719 commit f364248a4dbbc216bf35ef51418cd52e21c63352 @mikeabdullah mikeabdullah committed Jul 29, 2010
Showing with 13 additions and 0 deletions.
  1. +13 −0 KSThreadProxy.h
View
13 KSThreadProxy.h
@@ -10,7 +10,20 @@
@interface NSObject (KSThreadProxy)
+
+// Any messages sent to the returned proxy object are neatly forwarded onto the
+// real object using the desired thread. You'll even get the return value back properly.
+// For convenience, can specify nil to target the main thread.
+//
+// Example:
+// NSString *foo = [[self ks_proxyOnThread:nil] foo];
+//
- (id)ks_proxyOnThread:(NSThread *)thread;
+
+// The default behaviour is to wait until done so that return values can be used. If
+// targetting a void returning method (or method whose result you don't care about), can
+// turn off waitUntilDone to avoid blocking.
- (id)ks_proxyOnThread:(NSThread *)thread waitUntilDone:(BOOL)waitUntilDone;
+
@end

0 comments on commit f364248

Please sign in to comment.