I am running a thread that has a
while(isRunning)
{
blockingCollection.Take()
}
First I am setting isRunning to false. Then I call thread.Interrupt which stops the blockingCollection from waiting for new items. After that I call my Dispose Method for the class running the Thread inside the catch block.
Is that the best/correct way to do this?