阅读背景:

NSLog如何解决优化错误?

来源:互联网 

My app creates secondary thread by NSOperationQueue. In main thread, it writes message in buffer which is global variable. In secondary thread, it wait until message with new line character arrives. It works well without optimization option. It stays in while loop if I compile with any optimization option(-O1 ~ -Os). But if I write NSLog inside loop, it works. What is problem of this? Is there better way I can solve this problem without using NSLog?My app creates secondary thread by NSOperationQ




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: