At 11:59 AM 10/27/2006 +0200, Daniel McBrearty wrote:
>Now I want to run a thread inside this app that sends back info
>regularly. It needs to run in a seperate thread, and be startable and
>stoppable, which I have working. I don't care if the responses from
>the main thread and the reporter thread lines are mixed up ... ie

One simple thing u can do is to have a dedicated thread handle the sockets
and have the other threads communicate with it via a message queue.  This
way u never have to worry about thread collisions on the socket.  Any old
thread that wants to talk just writes into that queue and the socket thread
checks it on a regular basis to see if anything needs to be sent.  U can
even have it write back to the calling thread any return/status information
about the socket send.


--
REMEMBER THE WORLD TRADE CENTER         ---=< WTC 911 >=--
"...ne cede malis"

00000100

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to