如果我有以下代码:
Runnable r = ...;
Thread thread = new Thread(r);
thread.setPriority((Thread.MAX_PRIORITY + Thread.NORM_PRIORITY) / 2);
Run Code Online (Sandbox Code Playgroud)
要么 ...
Runnable r = ...
Thread thread = new Thread( new Runnable() {
public void run() {
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_MORE_FAVORABLE);
r.run();
}
});
Run Code Online (Sandbox Code Playgroud)
是 android.os.Process方式需要/首选吗?
为什么 android.os.Process方式首选/必需?
据我所知,目前尚未明确记录.
android ×1