internal ThreadIsolationCommand(string instanceKey, string commandKey, string groupKey, string domain, Action <ICommandConfigSet> config, bool hasFallback) : base(instanceKey, commandKey, groupKey, domain, config)
        {
            Func <string, IsolationSemaphore> valueFactory       = null;
            HandleConfigChangeDelegate        handleConfigChange = null;

            if (hasFallback || this.HasFallback)
            {
                if (valueFactory == null)
                {
                    valueFactory = key => new IsolationSemaphore(base.ConfigSet.FallbackMaxConcurrentCount);
                }
                this.FallbackExecutionSemaphore = HystrixCommandBase.FallbackExecutionSemaphores.GetOrAdd(this.Key, valueFactory);
            }
            if (handleConfigChange == null)
            {
                handleConfigChange = delegate(ICommandConfigSet cf) {
                    ((ThreadIsolationCommand <T>) this).UpdateMaxConcurrentCount <T>(cf.CommandMaxConcurrentCount);
                    ((ThreadIsolationCommand <T>) this).UpdateCommandTimeoutInMilliseconds <T>(cf.CommandTimeoutInMilliseconds);
                };
            }
            base.ConfigSet.SubcribeConfigChangeEvent(handleConfigChange);
        }