I'd try putting all the Win32::OLE stuff into its own (single) thread,
separate from the GUI thread. Some creative use of variables (and e.g.
a Tk Progress bar) can allow you to provide a GUI which indicates how
long you've been waiting for a WMI call to respond.
HTH,
Jonathan
On 10/27/2011 5:24 PM, Ken Cornetet wrote:
I am writing a Win32::GUI app to monitor a Citrix farm of servers and
I’ve got things going pretty well. The problem is that I make a lot of
WMI calls (via Win32::OLE) and they can take anywhere from a second to
a couple of minutes to complete. This prevents the GUI code from doing
its normal event loop processing and results in a non-responsive
windows interface.
I’m thinking that threads are the answer, but any time I’ve mixed
threads and Win32::OLE, the results have been less than satisfactory.
Does anyone know how to make Win32::OLE (WMI specifically) and threads
work together?
Or, is there any way to do async WMI calls?
Ken Cornetet 812.482.8499
To err is human - to moo, bovine.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs