Answer the question
In order to leave comments, you need to log in
How to terminate a thread that is listening on a port
There is an application, on the button "Start" in a separate flow the port is listened. It is necessary to pause the flow on the "Stop" button. The problem is that while (true) is there and when the Thread.Abort () method is called, a blocking occurs. Please tell me how to solve this problem.
Answer the question
In order to leave comments, you need to log in
Why are you using Thread? Why not a BackgroundWorker with while (!worker.CancellationPending)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question