If I understand correctly, you should do this:
dispatch_queue_t thread = dispatch_queue_create("your dispatch name", NULL); dispatch_async(analyze, ^{
You can also write some method that will block it, but you need to know what type of parameters it will store:
-(void)performBlock:(void (^)(SomeType par1, SomeType par2))block ToData:(Sometype)data;
You can call it with an anonymous block:
[something performBlock:^(SomeType par1, SomeType par2){
And in the method, you can call your block as a simple C function:
block(par1, par2);
igofed
source share