Exemplo n.º 1
0
        public EnginePool(EnginePoolConfig config)
        {
            _config = config;

            for (var i = 0; i < 5; i++)
            {
                _cache.Enqueue(new JSEngine(this));
            }
        }
Exemplo n.º 2
0
        public EnginePool(EnginePoolConfig?config = null)
        {
            _config = config ?? new EnginePoolConfig();

            for (var i = 0; i < _config.StartEngines; i++)
            {
                _cache.Enqueue(new JSEngine(this));
            }
        }