Deleting job doesn't cancel a token


How a hangfire job is aware that it should stop with execution when it is in a deleted state. I don’t have access to a CancelationTokenSource object at the server-side of my application where my task is running, so I cancel a job with a BackgroundJob.Delete(jobId) method.

I have _token.ThrowIfCancellationRequested(); in a loop (it is in a client-side of my application) which should stop when cancellation occurs, but Delete method of BackgroundJob doesn’t change the cancel state of token and the task continues to run even a job is deleted.