Background : Suppose you are developing an application and you need to hit multiple Asynchronous request at a time. Now you are waiting for the responses from all the request to be complete. Question is When you received any response in a delegate, callback or Completion block, how to ensure whether all the request is completed or not ? There can be many ways to do this. I am explaining here two ways to handle this: 1) Use a simple Counter (Preferred for same type of request) 2) Use a enum with Bitwise Method Logical Explanation: Use a simple Counter: In this approach we need to use a counter. For every request we will increase the counter by 1 and when we receive the response, decrement it by 1. This approach is good if we have only one type of request. Like image downloading for gallery. In this approach we cannot differentiate that which request is completed or which is not. Use a enum with Bitwise Method In this approach we will use enum to keep t...