[LC++]sockets
Peter Poulsen
peter_poulsen at stofanet.dk
Wed Jul 3 06:05:06 UTC 2002
I know this is really a c question, but I'm programming in c++ so hope
it ok.
I have a couple of threads running, and i would like to know if it can
give any problems if one thread tries to write while another is reading?
As I see it I cannot but mutexs' around the socket, as the reading
thread just sit there and wait for something to come along. If I put
mutexs' around the socket, it would mean that all the sending threads
would wait for something to arrive before the reading thread would
release the lock.
To be more specifik: I have one reading thread, and multiple writing
threads.
--
Yours/Med venlig hilsen
Peter Poulsen
Naessundvej 208
9220 Aalborg East
+45 98 15 47 05
More information about the tuxCPProgramming
mailing list