목록dispatch_group_async (1)
ㄷㅣㅆㅣ's Amusement
[iOS/Objective-C] To run threads sequentialy or concurrently
[iOS/Objective-C]에서 thread를 순차적으로 처리하기.Thread starts when the other Thread ends [on iOS/Objective-C] 여러가지 방법이 있겠지만.... 세마포어를 사용하면 간단하다.There are so many way to do. but, you had better to use semaphore. 1. Create semaphoredispatch_semaphore_t sema = dispatch_semaphore_create(0); 2. Do Threaddispatch_async(......, ^ { // Do something ........ dispatch_semaphore_signal(sema);)}; 3. Wait for semapho..
Programming/iOS
2016. 2. 4. 20:30