Link to home
Start Free TrialLog in
Avatar of uri22
uri22

asked on

Connecting Threads

Im having a progran in c++ witch makes two kinds of threads , lets call them VeThreads and CuThreads.Each kind has many threads identified uniqelly by a certain key.This key can be found only Twice : first time on the VeThreads and the second time on the CuThreads making them a pair of threads.
I want to pass information between those two threads.
these two threads are made after a connection is made ,  each thread with a different network server.
How do I make this?
Should I use Events?
Is link list a correct way to keep the information need to be passed (there is a possibility that few threads of CuThreads are made before the VeThreads made or viseversa )
and if so how do I make it?
Please give me a full answer include a code example.
Thank you.
Uri
Avatar of umzilber
umzilber

Sounds like you need a Semaphore or a Monitor.

ASKER CERTIFIED SOLUTION
Avatar of abesoft
abesoft

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of uri22

ASKER

abesoft thank you for your answer.
I would like to receive a code example for your suggestion.
I will increase points !!!
uri22.