private ReactQueueConfiguration(
     MessageQueueThread dispatcherQueueThread,
     MessageQueueThread nativeModulesQueueThread,
     MessageQueueThread jsQueueThread)
 {
     _dispatcherQueueThread    = dispatcherQueueThread;
     _nativeModulesQueueThread = nativeModulesQueueThread;
     _jsQueueThread            = jsQueueThread;
 }
        public static ReactQueueConfiguration Create(
            ReactQueueConfigurationSpec spec,
            Action <Exception> exceptionHandler)
        {
            var dispatcherThreadSpec = MessageQueueThreadSpec.DispatcherThreadSpec;
            var dispatcherThread     = MessageQueueThread.Create(dispatcherThreadSpec, exceptionHandler);

            var jsThread = spec.JSQueueThreadSpec != dispatcherThreadSpec
                ? MessageQueueThread.Create(spec.JSQueueThreadSpec, exceptionHandler)
                : dispatcherThread;

            var nativeModulesThread = spec.NativeModulesQueueThreadSpec != dispatcherThreadSpec
                ? MessageQueueThread.Create(spec.NativeModulesQueueThreadSpec, exceptionHandler)
                : dispatcherThread;

            return(new ReactQueueConfiguration(dispatcherThread, nativeModulesThread, jsThread));
        }