c# - How to terminate a thread which has spawned another thread which is sleeping? -


I have a long lasting thread made from thread. Start ()

Then the class owner is settled, I call Thread 1. Joint () but naturally it does not return because its background is sleeping on the background thread.

P>

What will be the perfect solution to end a thread, which are other threads with little trouble?


I wrote a question when suddenly I realized that maybe I had a mental block I did this part

In the first place not to end the thread due to the background thread But wanted for another reason.

In the second - I had to use the timer instead because I had kept a thread for no reason - just waiting for one incident which happens once a day!

It was very stupid :) Sorry.

It is usually good to use thread thread thread for a short thread if you need background thread Is to use a new instance of thread to run for long periods and set its background property to correct.


Comments

Post a Comment

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -