Signal thread to abort

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

I have a thread which uses TcpListener to accept new nonnections.
I do this in Do/Loop statment
The "Do" statment is blocked when the TcpListener waits for new
connection.

I need a way to signal the thread to aborts itself.

If a make the "Do" statement to check with "Do While" or "Do Until",
but it is only checked each loop, which happens only when a connection
to the TCPListener is made.

Any ideas?

thanks
 
set the thread's IsBackground property to true, and the thread will quit when
the main thread quits.
 
Back
Top