How to get Android Thread ID?

前端 未结 2 1067
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 13:27

This code throws a \"Given thread does not exist\" exception when I try to use it in a thread:

android.os.Process.getThreadPriority((int) Thread.currentThread().         


        
2条回答
  •  死守一世寂寞
    2021-02-01 14:22

    android.os.Process.getThreadPriority(android.os.Process.myTid());
    

    For further reference

    http://developer.android.com/reference/android/os/Process.html#myTid()

提交回复
热议问题