Hi everybody,I want to send some message or data to a thread.I have got the thread id.How can I achieve this?
In general I want to have thread communication.Can anyone help me?
Printable View
Hi everybody,I want to send some message or data to a thread.I have got the thread id.How can I achieve this?
In general I want to have thread communication.Can anyone help me?
Can you explain some more..?
What you really want to do? Communicating on a thread? May be in a specific time interval? Explain it more pal.
A thread is an execution path in your program. You cannot send data to a thread. You can make the thread access some data, check for data, wait for data and so on.
Well say Daniel. :)
A thread listening on some dataStreams and I want such thread to send data via the dataStreams used.I have the thread's id also.Is is possible?
You can make a thread wait on a "data stream" as long as the "data stream" read API is written in such a way that will make the thread that is trying to read to wait until data is available and then notifies it. An example is the sockets API. So yes, it is possible. But again you don't send data to a thread, you notify a thread waiting for your data that the data has become available.
Thank you very much