Following up on my own message ... from: http://search.cpan.org/author/BBIRTH/Win32-SerialPort-0.19/lib/Win32/SerialPort.pm
"Asynchronous (Background) I/O The module handles Polling (do if Ready), Synchronous (block until Ready), and Asynchronous Modes (begin and test if Ready) with the timeout choices provided by the API. No effort has yet been made to interact with Windows events. But background I/O has been used successfully with the Perl Tk modules and callbacks from the event loop." So it seems that this approach (using asynchronous I/O with Tk callbacks) is blessed by the author of Win32::SerialPort. Jonathan At 10:12 AM 2/24/2003 -0500, Jonathan Epstein wrote: >Eric, > >Being curious about this question (and a related one a few days ago), I did some >google searches and learned about Tk::after. > >See: > http://www.mathematik.uni-ulm.de/help/perl5/doc/Tk/after.html > >Since apparently Tk itself isn't considered to be thread-safe, I wonder whether in >this case you should forget about threads and just use one of these 'after' callback >routines to perform all your serial port processing. > >Good luck ... let us know if you come up with a solution. > >Another (somewhat inconsistent) suggestion: since most of us can't really run your >serial port code, if you're still running into trouble you might produce some sample >code where the temperature and heart rate are generated pseudo-randomly, rather than >getting the data from the serial port. Of course then it won't have any Win32 >component, so it will be out of scope for this list ;-) But you can try reposting it >here as well as on PerlMonks, where there seems to be a lot of knowledge base on >topics like these. > >Good luck, > >Jonathan > >At 05:03 PM 2/22/2003 -0500, Hawley, Eric wrote: > >>I have created this gui application which when selecting the Start button >>from the menu will continue to run (infinite) until someone stops the >>processing. What I have is once the Start button is click it creates a >>thread where the while loop will be executed (so that the user can still >>interact with the GUI) and information will read in from a serial port and >>processed. Once this information is processed I would like it to update the >>GUI display for $temperature and $heart_rate and I can't seem to figure this >>out. If someone can point out my faults I would apperciate it. >> >>Code is attached >>Thanks >>Eric >> _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs