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

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -