mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove overriding thread priority for RN Main Thread (#46101)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46101 Remove overriding thread priority for RN Main Thread as it is not possible to update main thread. changelog: [internal] internal Reviewed By: javache Differential Revision: D61448536 fbshipit-source-id: 44ec28a875e3208df042ac11bdd17a7287836ebb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dee503812a
commit
ed1410136f
+1
-10
@@ -16,7 +16,6 @@ import com.facebook.common.logging.FLog;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.AssertionException;
|
||||
import com.facebook.react.bridge.SoftAssertions;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.futures.SimpleSettableFuture;
|
||||
import java.util.concurrent.Callable;
|
||||
@@ -192,15 +191,7 @@ public class MessageQueueThreadImpl implements MessageQueueThread {
|
||||
*/
|
||||
private static MessageQueueThreadImpl createForMainThread(
|
||||
String name, QueueThreadExceptionHandler exceptionHandler) {
|
||||
final MessageQueueThreadImpl mqt =
|
||||
new MessageQueueThreadImpl(name, Looper.getMainLooper(), exceptionHandler);
|
||||
|
||||
if (UiThreadUtil.isOnUiThread()) {
|
||||
Process.setThreadPriority(Process.THREAD_PRIORITY_DISPLAY);
|
||||
} else {
|
||||
UiThreadUtil.runOnUiThread(() -> Process.setThreadPriority(Process.THREAD_PRIORITY_DISPLAY));
|
||||
}
|
||||
return mqt;
|
||||
return new MessageQueueThreadImpl(name, Looper.getMainLooper(), exceptionHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user