About Threads in VB.NET

U

User

Hi,

Why do I get this message :
"The thread '3201' (0x5e8) has exited with code 0 (0x0)." But my
application has not exited yet. This message appear after I created my
thread.

Thank you!
 
A

Armin Zingler

User said:
Hi,

Why do I get this message :
"The thread '3201' (0x5e8) has exited with code 0 (0x0)." But my
application has not exited yet. This message appear after I created
my thread.

Maybe your thread already exited?
Maybe it's the garbage collector working in the background.

For better identification, set the name of your own threads (including the
main thread).


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
U

User

Thank you for your reply, I'll name my main thread.

I have another question. Is it possible to deliver a message to all my
threads. Ex: if I have 10 threads (one for each of my clients connected
to my application) all doing the same stuff, can I send the message
"test" to all of them ? Expecting to have parallelism in all the
threads execution.

Thank you very much.
 
A

Armin Zingler

User said:
I have another question. Is it possible to deliver a message to all
my threads. Ex: if I have 10 threads (one for each of my clients
connected to my application) all doing the same stuff, can I send
the message "test" to all of them ? Expecting to have parallelism
in all the threads execution.


Depends on the purpose and what the main loop of the threads do. You could
add a message to a synchronized object (e.g. an Arraylist) that each thread
checks from time to time.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 

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

Top