multithreading - How to kill native threads in Android application -


i'm using ddms monitor threads in app, , see app has bunch of native threads shown in follow picture. , time time, number of native threads increased user interact app, cause app sometime not serve expect. there anyway kill these native threads?

native threads in android application

there no such thing "native thread" on android, although people might use refer threads not attached vm (which make them invisible ddms). threads happen executing (or waiting) in native code @ time did thread dump, may spend of time executing bytecode. (a list of dalvik thread states available here.)

the names of threads suggests created without being given explicit name. 1 thread name, nsdmanager exists because you're using nsdmanager, "responses requests application on listener callbacks on seperate thread" [sic].

it's possible can glean useful information stack trace. in ddms, double-click thread backtrace. on rooted device, can kill -3 <pid> full dump, including native stack frames.

killing arbitrary threads not allowed, might holding locks or other resources. if can determine starting them, , unnecessary, can prevent them being started in first place.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -