public void CancelAsync () { if (!support_cancel) throw new InvalidOperationException ("This background worker does not support cancellation."); if (!IsBusy) return; cancel_pending = true; }