예제 #1
0
        static void Main(string[] args)
        {
            Console.CancelKeyPress += new ConsoleCancelEventHandler(CtrlcHandler);

            AppDomain.CurrentDomain.UnhandledException += (s, e) => Console.WriteLine("*** Crash! *** UnhandledException");
            TaskScheduler.UnobservedTaskException      += (s, e) => Console.WriteLine("*** Crash! *** UnobservedTaskException");

            var tps  = PrepareTensorProcessors();
            var aggr = new TensorProcessingService(tps, Settings.Default.StressCycles, _cts.Token);

            ServiceLocatorAntiP.TensorProcessingResultSource = aggr as ITensorProcessingResultSource;

            var wsTask     = Task.Run(() => SelfHostedWebService.RunWebServiceHost <WebServiceStartup>());
            var tensorTask = Task.Run(() => aggr.Run());

            Task.WaitAll(new Task[] { wsTask, tensorTask });
        }
예제 #2
0
 public static async Task Main(string[] args)
 {
     await SelfHostedWebService.RunWebServiceHost <WebServiceStartup>();
 }