I have a method like:
- (BOOL)shouldDoSomeWork {
   BOOL result = // here I need do hard work with data in background thread and return result, so main thread should wait until the data is calculated and then return result;
   return result;
}
How to implement that?
 
     
     
     
     
    