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
I would avoid trying to do this with threads. You can handle it all from a single thread using IO::Select::can_read to handle any pending inbound socket traffic and can_write to make sure a write won't block (or you can use non-blocking IO). Use sysread/write to do the actual IO. I can't think of any reason to use threads to do this on Win32 - you're asking for trouble. If you insist on using threads, do as previously suggested and do all of the socket processing in one thread. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs