BackgroundWorker.request_cancellation

BackgroundWorker.request_cancellation()[source]

Mark the current worker as cancelled, so that the background task can stop processing.