Say I have some function that has to perform some asynchronous operation; the sequence is like this:
-(void) f1 {
//1. invoke some asynchronous operation
//2. wait until asynchronous operation ends and invokes some delegate method
//3. let delegate method end
//4. exit function
}
The function is called using GCD queue (serial or concurrent).
Constraints: notifications cannot be used; steps must be strictly in that order; NSOperation should not be used;
How the blocking part (#2 in the sequence) can be implemented?