public ConcurrentFactory GetConcurrentFactory()
            {
                var f = _ConcurrentFactory;

                if (f == null)
                {
                    lock ( _SyncLock )
                    {
                        f = _ConcurrentFactory;
                        if (f == null)
                        {
                            f = new ConcurrentFactory(CONCURRENT_FACTORY_INSTANCE_COUNT);
                            _ConcurrentFactory = f;
                        }
                    }
                }
                return(f);
            }
Exemplo n.º 2
0
            public ConcurrentFactory GetConcurrentFactory()
            {
                var f = _ConcurrentFactory;

                if (f == null)
                {
                    lock ( _SyncLock )
                    {
                        f = _ConcurrentFactory;
                        if (f == null)
                        {
                            var config = new UrlDetectorConfig(Config.URL_DETECTOR_RESOURCES_XML_FILENAME)
                            {
                                UrlExtractMode = UrlDetector.UrlExtractModeEnum.Position,
                            };
                            f = new ConcurrentFactory(config, Config.CONCURRENT_FACTORY_INSTANCE_COUNT);
                            _ConcurrentFactory = f;
                        }
                    }
                }
                return(f);
            }