Wait and notify equivalent in Objective c?

后端 未结 1 418
不思量自难忘°
不思量自难忘° 2021-01-04 03:15

I am transferring a program from java to Objective C and need to use wait and notify methods that are frequently used for threading in java but can\'t seem to find any good

相关标签:
1条回答
  • 2021-01-04 04:05

    There are numerous techniques you could use. You can use NSCondition or POSIX semaphores or dispatch semaphores or by using run loops. Check out the Concurrency Guide and the the Threading Guide.

    My personal favourite at the moment is the dispatch semaphore.

    0 讨论(0)
提交回复
热议问题