protected override void OnExecute() { FitSurfaceContext fsc = new FitSurfaceContext(Dest, Source, Rects, ResamplingAlgorithm.Bicubic); for (int i = 0; i < Rects.Length; ++i) { ThreadPool.QueueUserWorkItem(new WaitCallback(fsc.FitSurface), i); } ThreadPool.Drain(); }
protected override void OnExecute() { WaitCallback wc = new WaitCallback(RenderThreadProc); for (int n = 0; n < Iterations; ++n) { for (int i = 0; i < Rois.Length; ++i) { object iObj = BoxedConstants.GetInt32(i); ThreadPool.QueueUserWorkItem(wc, iObj); } } ThreadPool.Drain(); }