【发布时间】:2018-01-02 16:20:21
【问题描述】:
我试图了解启动应用程序时所有线程运行的内容。 我在 Android Studio 中创建了一个简单的应用程序,没有添加额外的代码行,它只是 android studio 创建的一个简单的 Hello World 应用程序。
当我为我的应用程序 UID 运行 adb shell ps 和 grep 时,我看到以下输出:
C:\Users>adb shell ps -t | findstr u0_a110
u0_a110 3596 655 1593724 66480 SyS_epoll_ 0000000000 S com.example.rhbj36.myapplication
u0_a110 3601 3596 1593724 66480 futex_wait 0000000000 S Jit 线程池
u0_a110 3602 3596 1593724 66480 do_sigtime 0000000000 S 信号捕捉器
u0_a110 3603 3596 1593724 66480 poll_sched 0000000000 S JDWP
u0_a110 3604 3596 1593724 66480 futex_wait 0000000000 S ReferenceQueueD
u0_a110 3605 3596 1593724 66480 futex_wait 0000000000 S FinalizerDaemon
u0_a110 3606 3596 1593724 66480 futex_wait 0000000000 S FinalizerWatchd
u0_a110 3607 3596 1593724 66480 futex_wait 0000000000 S HeapTaskDaemon
u0_a110 3608 3596 1593724 66480 binder_thr 0000000000 S Binder:3596_1
u0_a110 3609 3596 1593724 66480 binder_thr 0000000000 S Binder:3596_2
u0_a110 3610 3596 1593724 66480 futex_wait 0000000000 S 配置文件保存程序
u0_a110 3612 3596 1593724 66480 SyS_epoll_ 0000000000 S RenderThread
u0_a110 3613 3596 1593724 66480 binder_thr 0000000000 S Binder:3596_3
u0_a110 3614 3596 1593724 66480 futex_wait 0000000000 shwuiTask1
有人可以帮助理解这些'Binder:3596_1,2,3'线程是什么吗?以及为什么要创建它们? 对其他线程的解释也会有所帮助。
【问题讨论】:
标签: android multithreading android-binder