Execute init task on thread pool executor

Reviewed By: foghina

Differential Revision: D3522112

fbshipit-source-id: 8a0880d0e7bf3e0bce02c44e8d504f01ab47beb8
This commit is contained in:
Alexander Blom 2016-07-06 10:30:52 -07:00 committed by Facebook Github Bot 9
parent c3f2bba834
commit c57eb94b34
1 changed files with 1 additions and 1 deletions

View File

@ -710,7 +710,7 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
if (mReactContextInitAsyncTask == null) {
// No background task to create react context is currently running, create and execute one.
mReactContextInitAsyncTask = new ReactContextInitAsyncTask();
mReactContextInitAsyncTask.execute(initParams);
mReactContextInitAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, initParams);
} else {
// Background task is currently running, queue up most recent init params to recreate context
// once task completes.