Beispiel #1
0
        private async static Task RunOption1()
        {
            Option1.StoreManagerFactory factory      = new Option1.StoreManagerFactory();
            Option1.StoreManager        storeManager = factory.GetStoreManager(1, 1, 5);
            storeManager.Start();

            // the Store flow runs in other threads, so the flow of this function continues, and we may use storeMAnager.Stop().
            await Task.Delay(20000);

            storeManager.Stop();
            Console.WriteLine("************** Store is closed! **************");
        }
Beispiel #2
0
 private int GetCashiersCount(int customerEnqueueRateInSeconds, int minCashierProcessingTime, int maxCashierProcessingTime)
 {
     return(StoreManager.GetOptimalCashiersCount(customerEnqueueRateInSeconds, minCashierProcessingTime, maxCashierProcessingTime));
 }