I have a method which gets called when receiving data from the network. Just out of curiosity I kept a counter to check if the async calls to the same thread are synchronous. I know its dumb, but I found something strange.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSLog(@"counterForAsync=%d",counterForAsync);
++counterForAsync;
if (file) {
[file seekToEndOfFile];
}
[file writeData:data];
});
I copied the console log and observed it in sublime, and saw that some line were repeated.
same thing in on a few other lines. If it is running twice then its bad because I am performing file operation in my async thread.

