예제 #1
0
        public void TestMethod1()
        {
            var policy = new TaskManagerPolicy();

            policy.BulkheadReserve(4, 4, 4);

            Assert.IsTrue(policy.PriorityLevelReservations.Max((p) => p.Level) == 4);
        }
예제 #2
0
        public MandelbrotServer()
        {
            TileWidth  = size;
            TileHeight = size;

            MinLevel = 0;
            MaxLevel = 31;

            ServerName = "Mandelbrot";

            // todo number of processors being used is a problem - too small is slow, too big blocks all other threads, including rendering thread, so
            // application stops to respond.
            TaskManagerPolicy policy = new TaskManagerPolicy(1, Environment.ProcessorCount, 1, 0, System.Threading.ThreadPriority.Lowest);

            manager = new TaskManager(policy);
        }