gpt4 book ai didi

iphone - NSRunLoop 线程安全吗?

转载 作者:行者123 更新时间:2023-11-28 18:11:47 26 4
gpt4 key购买 nike

我不太清楚 NSRunLoop 是否线程安全。所以我需要澄清一下它是否线程安全,为什么?

任何帮助都是可观的。

最佳答案

NSRunLoop 的开头有一个警告 official reference documentation :

Warning: The NSRunLoop class is generally not considered to be thread-safe and its methods should only be called within the context of the current thread. You should never try to call the methods of an NSRunLoop object running in a different thread, as doing so might cause unexpected results.

关于iphone - NSRunLoop 线程安全吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16771195/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com