enable the usage of the BGUI thread

Reviewed By: javache

Differential Revision: D4928729

fbshipit-source-id: 2a3baa01856cb7145d5f0155da0b959c330b7425
This commit is contained in:
Aaron Chiu
2017-04-25 16:17:05 -07:00
committed by Facebook Github Bot
parent 28aaa88808
commit 513da6fcf2
8 changed files with 55 additions and 13 deletions
@@ -308,6 +308,10 @@ public class ReactContext extends ContextWrapper {
Assertions.assertNotNull(mJSMessageQueueThread).runOnQueue(runnable);
}
public boolean hasUIBackgroundRunnableThread() {
return mUiBackgroundMessageQueueThread != null;
}
public void runUIBackgroundRunnable(Runnable runnable) {
if (mUiBackgroundMessageQueueThread == null) {
runOnNativeModulesQueueThread(runnable);