Esempio n. 1
0
        private void CreateTask(TileIndex id, DataRect bounds)
        {
            Task task = Task.Create(o =>
            {
                var set     = new MandelbrotSet(size, bounds);
                set.Palette = new HSBPalette();
                var bmp     = set.Draw();
                bmp.Freeze();
                ReportSuccessAsync(null, bmp, id);

                LookForNexttask();
            }, manager);
        }
        private void CreateTask(TileIndex id, DataRect bounds)
        {
            var task = factory.StartNew(() =>
            {
                var set     = new MandelbrotSet(size, bounds);
                set.Palette = new HSBPalette();
                var bmp     = set.Draw();
                bmp.Freeze();
                ReportSuccessAsync(null, bmp, id);

                LookForNexttask();
            });
        }
        private void CreateTask(TileIndex id, DataRect bounds)
        {
            Task task = factory.StartNew(() =>
            {
                Thread.CurrentThread.Priority = ThreadPriority.Lowest;

                var set     = new MandelbrotSet(size, bounds);
                set.Palette = new HsbPalette();
                var bmp     = set.Draw();
                bmp.Freeze();
                ReportSuccessAsync(null, bmp, id);

                LookForNextTask();
            });
        }