My application runs some threads and every thread does something.
I want that each thread shows its status in a list box.
So, how a thread can identify itself (by using thread ID or something else) and set its status into a List?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Every thread has an id. You can access it with
To update a global datastructure with some state i would use a dictionary and use the id as the key. Be aware of locking the access of that data structure: