Пример #1
0
        private void StartCRAWorker(string craInstanceName, int port, string ambrosiaInstanceName)
        {
            string ipAddress = GetLocalIPAddress();
            string storageConnectionString  = Environment.GetEnvironmentVariable("AZURE_STORAGE_CONN_STRING");
            int    connectionsPoolPerWorker = 1000;

            CRAWorkerThreadStartParams threadParams = new CRAWorkerThreadStartParams(craInstanceName, ipAddress, port, storageConnectionString, null, connectionsPoolPerWorker, ambrosiaInstanceName);
            Thread thread = new Thread(new ParameterizedThreadStart(RunCRAWorker));

            thread.IsBackground = true;
            thread.Start(threadParams);
        }
Пример #2
0
        private void RunCRAWorker(Object obj)
        {
            CRAWorkerThreadStartParams threadParams = (CRAWorkerThreadStartParams)obj;
            CRAWorker worker = new CRAWorker(
                threadParams._instanceName,
                threadParams._ipAddress,
                threadParams._port,
                threadParams._storageConnectionString,
                threadParams._descriptor,
                threadParams._streamsPoolSize);

            worker.DisableDynamicLoading();
            worker.Start();
        }
Пример #3
0
        private void RunCRAWorker(Object obj)
        {
            CRAWorkerThreadStartParams threadParams = (CRAWorkerThreadStartParams)obj;

            worker = new CRAWorker(
                threadParams._craInstanceName,
                threadParams._ipAddress,
                threadParams._port,
                threadParams._storageConnectionString,
                threadParams._descriptor,
                threadParams._streamsPoolSize);
            worker.DisableDynamicLoading();
            worker.SideloadVertex(new AmbrosiaRuntime(), threadParams._ambrosiaInstanceName);
            worker.Start();
        }