On May 10, 10:36 pm, Oceanedge <newsforhar...@gmail.com> wrote:
> I need to implement a JNI which render image with 3-party native
> function.  This function call is time consuming, it cost about 1s to
> return. I found during that time, even if I call the JNI within
> another Java thread, the whole Dalvik VM is blocked. UI is frozen. I
> guess that's because Dalvik doesn't implement Java thread with a
> native thread, so any time consuming native function call will block
> the whole VM.

Your assumptions are incorrect -- threads in Dalvik are implemented
with Linux pthreads.

Attach a debugger to your process, and when the UI appears to be
locked up, stop the app and examine the stack trace for the main
thread.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to