阅读背景:

latch(用于等待异步响应)冻结WebView(和UI)

来源:互联网 

I have an app that displays a webview on the whole layout. Sometimes I need to call an async method, that async operation is done by a 3-party sdk, and then I wait for it for a while until I get the response to a designated listener. I have solved it with a latch - once the response is received in the listener, I countDown the latch and then the initiating method can continue with this response. Unfortunately, when I do this, the WebView is stuck. I imagined the native UI would be stuck , but I didn't expect the webview to get frozen as well. How can that be overcome?I have an app that displays a webview on the wh




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

分享到: