Created
July 1, 2009 08:50
-
-
Save gabriel/138685 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Invoke after 2 second delay (useful for simulating slow operations) | |
[[self gh_proxyAfterDelay:2.0] listWithOffset:40 limit:20]; | |
// Invoke on main thread (if you ran on a separate thread or NSOperation | |
// and wanted to call back the delegate on the main thread) | |
[self listWithOffset:40 limit:20 delegate:[delegate_ gh_proxyOnMainThread:YES]]; | |
// Later, after listing, the connection invokes the delegate back on the | |
// main thread | |
[delegate_ connection:self didListWithOffset:40 limit:20]; | |
// Invoke on thread | |
[[self gh_proxyOnThread:thread waitUntilDone:NO] listWithOffset:40 limit:20]; | |
// Time the invocation | |
NSTimeInterval time; | |
[[self gh_timedProxy:&time] listWithOffset:40 limit:20]; | |
NSLog(@"Took %0.2fs", time); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment