correct way to wait for dispatch_semaphore in order to wait for many async tasks to complete
- 阅读更多 关于 correct way to wait for dispatch_semaphore in order to wait for many async tasks to complete
I have an asynchronous method longRunningMethodOnObject:completion: this method receives an object of type 'Object' - does work with its data and then calls the completion handler. I need to call many different "longRunningMethods" and wait for all to complete. I would like all of the "longRunningMethodOnObject" to run asynchronously (parallel) to each other in the "for" loop. (I am not certain if the "longRunningMethodOnObject" runs in serial to each other but this is more of a general question) I'm not sure I have created a proper semaphore and would appreciate an explanation on the proper