Brian,

Thanks for the offer. Will send as soon as I get to my Production box.
Meanwhile, I have  found message from Johan Lindstrom with multi-threaded 
version of his FetchURL demo. Blair Sutton posted info about working M-T model 
which uses  Thread::Queue module to make a queue sub before Dialog phase of the 
script. Queue accepts @ARGS from the Event handlers later.

Anyhow, I will send you a my code tomorrow.

Thanks.
Igor. 
  ----- Original Message ----- 
  From: Brian Millham 
  To: 'Igor Anufriyenko' ; perl-win32-gui-users@lists.sourceforge.net 
  Sent: Thursday, December 29, 2005 8:46 PM
  Subject: RE: [perl-win32-gui-users] PerlApp issue


  I haven't played with threads while using Win32::GUI.  I have created a 
fairly complicated perl based service that used threads, so I'd be willing to 
help you out with this one.



  Supply me with a sample script (with animation files attached) and I'll see 
if I can get a threaded version running.



  For the Win32::GUI guirus (spelling intendedJ), is Win32::GUI thread safe?



  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: Thursday, December 29, 2005 8:31 PM
  To: perl-win32-gui-users@lists.sourceforge.net
  Subject: Re: [perl-win32-gui-users] PerlApp issue



  Brian,



  I have tried fork(), threads, Thread - none of them work.

  So far opening a pipe for reading open (CM,"gpresult |" ) and system() 
function proved to work in uncompiled script. The latter is quite interesting 
since it does a hidden fork() for you.

  All what I am trying to achieve is running findfile  animation to spice up 
users' passtime while shell utilities running on the background.

  Modules used in this script are Win32::OLE, Win32::GUI::Loft, Win32();



  A working example of the multi-thread implementation in the GUI script would 
be much appreciated.



  Thank you,



    ----- Original Message ----- 

    From: Brian Millham 

    To: 'Igor Anufriyenko' 

    Sent: Wednesday, December 28, 2005 11:58 PM

    Subject: RE: [perl-win32-gui-users] PerlApp issue



    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: Outbound message clean.
    Virus Database (VPS): 0552-1, 12/28/2005
    Tested on: 12/28/2005 11:58:16 PM
    avast! is copyright (c) 2000-2003 ALWIL Software.
    http://www.avast.com



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




  ---
  avast! Antivirus: Outbound message clean.
  Virus Database (VPS): 0552-2, 12/29/2005
  Tested on: 12/29/2005 8:46:27 PM
  avast! is copyright (c) 2000-2003 ALWIL Software.
  http://www.avast.com




Reply via email to