I'm surprised that this works at all, even as a script.  I'd expect the
animation to hang, because the script is stopped waiting for your gpresult
program to run.

 

You may want to consider running gpresult in a separate thread

 

Brian Millham
This message traveled at least 44,000 miles to reach you!
Creator of the DW6000 Monitor
http://www.millham.net/dw6000
[EMAIL PROTECTED] 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor
Anufriyenko
Sent: Wednesday, December 28, 2005 10:34 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] PerlApp issue

 

Hello,

 

After compiling Win32::GUI script with PerlApp PDK 6.0.2 and running it as
EXE  Animation control freezes while fork() or system() are executed on the
background to run CPU-intensive processes.

However, uncompiled .PL script runs fine - AVI file is being played OK.

Does anybody have a workaround ? or had a similar issue?

 

code looks similar to this:

 

sub btn_Start_Click {

$animation->Open(file.avi);

$animation->Play(0,-1,-1);

$animation->Show();

&runsomething();

}

sub runsomething {

open CH, "gpresult |";

while (<CH>) {

#do something...;

}

 # or :

system("gpresult");

close CH;

}

 

As mentioned above, perl script.pl runs just fine, though child process
utilizes up to 99% of CPU time.

I have tried DoEvents() with no effect whatsoever.

 

Thank you,

Igor.

---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 0552-1, 12/28/2005
Tested on: 12/28/2005 10:41:46 PM
avast! is copyright (c) 2000-2003 ALWIL Software.
http://www.avast.com




---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0552-1, 12/28/2005
Tested on: 12/29/2005 12:05:58 AM
avast! is copyright (c) 2000-2003 ALWIL Software.
http://www.avast.com



Reply via email to