Guest User

Untitled

a guest
Apr 4th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void logNumbers() {
  2.     int start = 1, end = 10;
  3.     for (int index = start; index <= end; index++) {
  4.         NSLog(@"%d", index);
  5.     }
  6. }
  7.  
  8. void logAlphabets() {
  9.     int start = 65, end = 90;
  10.     for (int index = start; index <= end; index++) {
  11.         NSLog(@"%c", index);
  12.     }
  13. }
  14.  
  15. -(void) viewDidAppear:(BOOL)animated {
  16.     [super viewDidAppear:animated];
  17.    
  18.     dispatch_queue_t aQueue;
  19.    
  20.     // Get the global concurrent queue.
  21.     aQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
  22.    
  23.     dispatch_async_f(aQueue, NULL, logNumbers);
  24.     dispatch_async_f(aQueue, NULL, logAlphabets);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment