Hello,
I’ve got a communication problem between the threads of two different
processes:
I have two server processes (Central_Server and Local_Server) and one client
process (Local_Client) running on one machine. The task is intended as
follows (please take a pen and a piece of paper) :
- Local_Server sends a message “REQUEST” to Central_Server, who was receive
blocked before. This message is received and sent to Local_Server, who was
receive blocked. Local_Server immediately replies (Central_Server so
unblocks again). Central_Server receive blocks for further messages. - After Local_Server has processed the “REQUEST” it sends the “ANSWER” to
Central_Server who replies the “ANSWER” at first back to Local_Client, who
was still waiting and now unblocks. Then Central_Server replies back to
Local_Server, who unblocks.
In theory and practice everything runs fine as long as Local_Client,
Local_Server and Central_Server are all one-threaded processes. But I have
to design Local_Server as two-threaded: One thread (2) always receive blocks
while the other thread (1) is free for user inputs that effect the messages
to be reacted on. In Central_Server I use a list that stores the rcvids of
the single reply-tasks. But when I try to unblock Local_Server (thread 2) by
Central_Server after sending a reply to Local_Client, the message does not
arrive at Local_Server although Central_Server has sent it correctly.
Does anybody know why this happens and what thread 2 of Local_Server can do
to be able to receive the reply from Central_Server?
I hope that I was able to describe this (maybe easy problem) properly. Thank
you.
Nnamdi