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.
[NSThread currentThread] isMainThread]
UIAlertView
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).
POST
RKObjectManager
success
failure
I am embarrassed.
What's happening?
, , , , ( ). , , .
, , . , . , .
, .
RKObjectManager RKObjectRequestOperation ( POST) NSOperationQueue .
RKObjectRequestOperation
NSOperationQueue
- - success failure . , ( ).
, RKObjectRequestOperation 2 , successCallbackQueue failureCallbackQueue, , , - , :
successCallbackQueue
failureCallbackQueue
[[NSOperationQueue mainQueue] addOperationWithBlock:^{ }];