in reply to Re^2: Win32::GUI window freezing, even with threading.
in thread Win32::GUI window freezing, even with threading.
I took that from http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=reference-methods#dialog
There is no mention of "dequeue" anywhere on that page.
The problem is not the bit you did take from that page; it is the bit you added:
#wait for data, print data to GUI textbox while(Win32::GUI::DoEvents() != -1) { my $tmptxt = $DataQueue->dequeue(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ $main_text_window->Append($tmptxt); }
If the queue is empty, the call to dequeue() will block and your GUI will freeze.
|
---|