in reply to Win32::GUI window freezing, even with threading.
#!/usr/bin/perl -- use strict; use warnings; use threads; use Thread::Queue; ## how $guithread and $mechthread communicate my $DataQueue = Thread::Queue->new(); my $guithread = threads->create( sub { require MyApp::GUI; ## MyApp/GUI.pm MyApp::GUI::go(@_); ## uses timer to check on queue }, $DataQueue, ); my $mechthread = threads->create( sub { require MyApp::Mech; ## MyApp/Mech.pm MyApp::Mech::go(@_); }, $DataQueue, ); $guithread->join; ## wait for gui to finish
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Win32::GUI window freezing, even with threading.
by chute (Initiate) on May 28, 2013 at 05:24 UTC | |
by Anonymous Monk on May 28, 2013 at 06:54 UTC | |
by chute (Initiate) on May 28, 2013 at 13:24 UTC |