Beispiel #1
0
    static void Main(string[] args)
    {
      var db = new SingletonDB();
      var workerPool = new WorkerPool("Hen");
      var queue = new FIFOQueue(workerPool, db);
      var scheduler = new LazyScheduler(queue);
      var workerFactory = new ClousotWorkerFactory(scheduler, null, db);

      scheduler.FeedQueue(new ISliceId[0]); // TODO: call slicer

      var numberOfWorkers = Environment.ProcessorCount;
      numberOfWorkers = 1;

      for (var i = 0; i < numberOfWorkers; i++)
        workerPool.CreateWorker(workerFactory);

      workerPool.WaitAll();
      workerPool.StopAll();
    }
Beispiel #2
0
        static void Main(string[] args)
        {
            var db            = new SingletonDB();
            var workerPool    = new WorkerPool("Hen");
            var queue         = new FIFOQueue(workerPool, db);
            var scheduler     = new LazyScheduler(queue);
            var workerFactory = new ClousotWorkerFactory(scheduler, null, db);

            scheduler.FeedQueue(new ISliceId[0]); // TODO: call slicer

            var numberOfWorkers = Environment.ProcessorCount;

            numberOfWorkers = 1;

            for (var i = 0; i < numberOfWorkers; i++)
            {
                workerPool.CreateWorker(workerFactory);
            }

            workerPool.WaitAll();
            workerPool.StopAll();
        }