Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android default threads and their use

I'm working on an android library and to prevent the application from slowing down I'm doing as much as I can in separate threads.

I'm currently investigating which threads my library is responsible for which is not my responsability.

I created a very simple android application, and tested before and after.

The important part is what's going on before and why all those threads are already created by android.

  1. main : the main execution thread.
  2. GC : Garbage collector thread.
  3. Signal Catcher : Thread catching signals.
  4. compiler
  5. ReferenceQueueDaemon : http://osxr.org/android/source/libcore/luni/src/main/java/java/lang/Daemons.java#0116
  6. FinalizerDaemon
  7. FinalizerWatchDogDaemon
  8. Binder_* : Android: What is Binder Thread?

I'm currently trying to figure out their use and will post the results I found little by little. In the mean while if you have informations about them it seems like it coul be useful to have a post here with everything gathered.

like image 619
SeikoTheWiz Avatar asked Jun 24 '14 08:06

SeikoTheWiz


1 Answers

The binder threads are used by the application to communicate with the OS and other applications on the system. Android is based upon an event based system and so everything is done by passing "Event objects" onto queues. An example of this is when you send an intent. The intent is passed off to the other event queues in the other apps by use of the Binder Threads.

like image 135
nbroeking Avatar answered Oct 11 '22 13:10

nbroeking