hellow:
access_queue is created in the singleton A class
in class A
dispatch_async(access_queue, ^{
NSLog(@"A:%@", [NSThread currentThread]);
});
in class B
dispatch_async(access_queue, ^{//access_queue of class A
NSLog(@"B:%@", [NSThread currentThread]);
});
Print out A and B in the console to execute in two different child threads.
my question:
I want to know if there is a way to make different code blocks execute in the same sub-thread.