ios - How does NSURLConnection gives callback on the same thread? -
how nsurlconnection asynchronous request gives callbacks on same thread called from?
if have design worker class take work off calling thread , when done give completion callback on same thread called from, how that?
typedef void (^basictask)(void); @protocol workerdelegate - (void)taskdidsucceed; - (void)taskdidfailwitherror:(nsstring *)errordescription; @end @interface worker { id <workerdelegate> delegate; } -(void)performtaskinbackground:(basictask)task; @end
Comments
Post a Comment