Multi-threaded operations

NSMutableArray *nums = [NSMutableArray
    arrayWithArray:@[@1, @2, @3]];

//the block captures the array
dispatch_async(dispatch_get_global_queue(
    QOS_CLASS_DEFAULT0), ^{
    NSLog(@"Child thread: %@", nums);
});

[nums addObject:@4];
NSLog(@"Main thread: %@", nums);