private void CreateRenderTask(DataRect visible, Rect output)
        {
            lock (this)
            {
                _bitmapInvalidated = true;

                if (_activeRequest != null)
                {
                    _activeRequest.Cancel();
                }
                _pendingRequest = new RenderRequest(_nextRequestId++, visible, output);
                _renderAction.InvokeAction(RenderThreadFunc);
            }
        }
 protected override void OnPlotterDetaching(Plotter plotter)
 {
     base.OnPlotterDetaching(plotter);
     _activeRequest?.Cancel();
 }