开发者

Android: which thread is native method running in?

Is there any sense in calling a native function from a separate开发者_Python百科 Java thread, or is it already being run in a separate thread by Dalvik VM?


Native methods are run just like other methods(unless specified otherwise in method description). You should handle the cases where you need to to run code that is slow so that UI wont be blocked. There are multiple ways for this, check this:

http://developer.android.com/resources/articles/painless-threading.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜