Good day.
I am engaged in self-education, and thought about the question. Can you please tell me how to properly interrupt the background thread from the main one without using any global variables, etc.? I know about CancellationToken, are there other ways?