iphone - Multithreading and Grand Central Dispatch on iOS -
now trying understand concept of gcd. using grand central dispatch how implement multithreading in application.i have idea gcd concept cant implement concept application.i need simple example blocks understand multithreading using gcd.please me...
ok.. simple example )
you can write code in method. example
-(void) viewdidload { [super viewdidload]; dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_default, 0), ^{ //here non-main thread. nslog (@"hi, i'm new thread"); dispatch_async(dispatch_get_main_queue(), ^{ //here returns main thread. nslog (@"hi, i'm main thread"); }); }); }
Comments
Post a Comment