Skip to content

Commit 81e4b42

Browse files
lexsFacebook Github Bot 3
authored andcommitted
Don't block waiting for UI thread to be ready
Reviewed By: astreet Differential Revision: D3323227 fbshipit-source-id: bc8a815f9dca43c8c1adebc7b2554f931f135f33
1 parent d973757 commit 81e4b42

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,16 @@ private static MessageQueueThreadImpl createForMainThread(
147147
final MessageQueueThreadImpl mqt =
148148
new MessageQueueThreadImpl(name, mainLooper, exceptionHandler);
149149

150-
// Ensure that the MQT is registered by the time this method returns
151150
if (UiThreadUtil.isOnUiThread()) {
152151
MessageQueueThreadRegistry.register(mqt);
153152
} else {
154-
final SimpleSettableFuture<Void> registrationFuture = new SimpleSettableFuture<>();
155153
UiThreadUtil.runOnUiThread(
156154
new Runnable() {
157155
@Override
158156
public void run() {
159157
MessageQueueThreadRegistry.register(mqt);
160-
registrationFuture.set(null);
161158
}
162159
});
163-
registrationFuture.getOrThrow();
164160
}
165161
return mqt;
166162
}

0 commit comments

Comments
 (0)