Messages can be sent between threads using several mechanisms. You can
use a WaitHandle (either ManualResetEvent or AutoResetEvent) to cause a
thread to block until another thread signals an event. You can use
Monitor.Pulse and Monitor.Wait in much the same way. If one of your
threads is running a Windows message loop then you can use
Control.Invoke or Control.BeginInvoke. And of course data can be
shared between threads by making sure the variables are accessible from
the code that each thread executes. The variables themselves can even
be used a signalling mechanism. It really depends on exactly how you
want the threads to work together.
Brian
Jck wrote:
Could someone tell me how a thread can send data / post message to another
thread in vb.net please?
I have a main thread and a socket thread. I need a way to let the main
thread know when my socket thread receive data.
Thanks in advance!