I run my ASIHTTPrequest synchronously in a separate thread, for example:
//inside this start method I create my ASIHTTPRequest and start it dispatch_async(dispatch_get_global_queue(0, 0), ^{ [process start]; });
But lock completion is still triggered in the main thread. Is it possible to save the execution of the completion block in the same thread where the request was launched?
The only thing I can decide is to determine the send queue and manually execute the final block in the same thread, thereby maintaining a link to the created queue. But this does not solve the problem directly, because you go to an instant little moment in the main thread before redirecting the rest of the code to the created send queue.
Does anyone have a better solution?
EDIT: The same is true for AFNetworking completion blocks ...
source share