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.
我正在按照 Matt Ghallagher 的教程的推荐测试performSelector:onThread:withObject:waitUntilDone:线程间通信。事实证明,它非常慢,对于实时音频应用程序几乎没有好处。有什么建议么?
在主线程上:
AnyClass myObject; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // do asynchronous work // environment objects and variables will be available [myObject doSomething]; });
真的没有比这更简单的了……