如何在iOS应用程序中实现信号量? [英] How to Implement Semaphores in iOS Application?

查看:187
本文介绍了如何在iOS应用程序中实现信号量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在ios应用程序中实现Counting Semaphore?

Is it possible to implement Counting Semaphore in ios application?

推荐答案

是的,有可能。
有很多同步工具可用:

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


  • @synchronized

  • NSLock

  • NSCondition

  • NSConditionLock

  • GCD信号量

  • pthread locks

  • ...

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

我建议阅读线程编程指南并询问更具体的内容。

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

这篇关于如何在iOS应用程序中实现信号量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆