android multi process and single thread principle

android system is real multi process system, all application that runs in its own Dalvik VM, correspond one linux process. and different process use binder to communicate. But android system only create one UI thread for each application, this UI thread have its own message queue and looper, system only ineract  with the UI thread, and user can only interact with system cross this UI thread. That the UI thread can not be blocked, if system not recieve the respons for time, will cause ANR. So ,there is not thread safe for update UI view in other thread, can only update ui view in UI thread.

你可能感兴趣的:(android multi process and single thread principle)