Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我怀疑dispatch_once()它是否在多线程上调用。请解释一下。
dispatch_once()
我很确定它只发送一次。
阅读文档。
如果您有任何实际证据让您对此表示怀疑,请分享,因为几乎每个人都使用它来创建单例,因为它从不执行多次。