Do RestKit termination blocks work in the main user interface thread?

My code tells me this is through [NSThread currentThread] isMainThread]and the fact that I can show UIAlertView. This seems unexpected because I understand that requests are sent asynchronously.

I would choose some code, but nothing special. I am POSTan object through completion blocks RKObjectManagerand successand failureis executed in the main thread of the user interface (although I definitely do the stuff in the background after the request is completed).

I am embarrassed.

What's happening?

+4
source share
2 answers

, , , , ( ). , , .

, , . , . , .

, .

+4

RKObjectManager RKObjectRequestOperation ( POST) NSOperationQueue .

- - success failure . , ( ).

, RKObjectRequestOperation 2 , successCallbackQueue failureCallbackQueue, , , - , :

    [[NSOperationQueue mainQueue] addOperationWithBlock:^{
    }];
+7

All Articles