How to Implement Semaphores in iOS Application?

前端 未结 4 429
长发绾君心
长发绾君心 2021-02-06 10:52

Is it possible to implement Counting Semaphore in ios application?

4条回答
  •  囚心锁ツ
    2021-02-06 11:41

    Yes, it is possible. There are quite a few synchronization tools available:

    • @synchronized
    • NSLock
    • NSCondition
    • NSConditionLock
    • GCD semaphores
    • pthread locks
    • ...

    I'd suggest reading "Threading Programming Guide" and asking something more specific.

提交回复
热议问题