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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top