什么是Web线程? [英] What is the Web Thread?
问题描述
由于一些自我引发的问题,我能够崩溃我的iPhone应用程序并收到以下错误:
Due to some self induced problems, I was able to crash my iPhone app and received the following error:
试图获取网络从主线程或Web线程以外的线程锁定。这可能是从辅助线程调用UIKit的结果。现在崩溃......
解决这个问题不是问题,但错误信息让我想到了......
Resolving this problem isn't an issue, but the error message got me thinking...
我知道主线程是什么,我知道如何将上下文切换回它。但是,这个网络线程是什么?我认为我以前从未听过这个术语。
I know what the main thread is, and I'm aware of how to switch contexts back to it. But, what is this "web thread"? I don't think I've ever heard that terminology before.
推荐答案
网络线程是一个由所有人共享的单个线程code> UIWebViews ,它在执行请求时暂时阻止主线程上的执行。
The web thread is a single thread shared by all UIWebViews
which temporarily blocks execution on the main thread while it's performing requests.
这篇关于什么是Web线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!