Michael,

I did quite a bit of experimenting with Fork and Win32::GUI a while ago.
The main problem I hit was perl crashed when the window closed.  I guessed
there was some sort of memory management problem but couldn't figure out
what.  Eventually I gave up and used a doevents approach (I did try Tk but
this isn't thread safe so crashes as soon as a fork occurs).

If you're still interested in trying fork I've attached one of the scripts
I was playing with.  The fork routines are in a seperate module PipeFork.pm
which I've also included.

The parent handles the windows events, tells the child what events have
occured and the child performs the appropriate actions (in this case
calculating the size of subdirectories).

I'll be interested to hear if you have more success than I did.

Cheers,

Kev.

(See attached file: fork.zip)



|---------+------------------------------------------------>
|         |           "Michael Alaly" <[EMAIL PROTECTED]>       |
|         |           Sent by:                             |
|         |           [EMAIL PROTECTED]|
|         |           ceforge.net                          |
|         |                                                |
|         |                                                |
|         |           17/10/2002 15:37                     |
|         |                                                |
|---------+------------------------------------------------>
  
>----------------------------------------------------------------------------------------------|
  |                                                                             
                 |
  |       To:       <perl-win32-gui-users@lists.sourceforge.net>                
                 |
  |       cc:                                                                   
                 |
  |       Subject:  [perl-win32-gui-users] LWP + Fork + Win32::GUI              
                 |
  
>----------------------------------------------------------------------------------------------|




Hello,

I don't know how to continue a thread that started before I joined the list
so I apologize in advance: "Is possible to modify LWP module in order to
avoid a frozen window ?"

I have spent the morning searching for some solutions involving LWP, Fork
and Win32::GUI. I saw in the archives for this list that some of this has
been discussed before and that one question I can answer had been asked by
"Guillem Cunillera Wefers <[EMAIL PROTECTED]>".

Guillem if you are still interested in how to do this, you will want to use
the callback function in LWP and call the DoEvents() inside that callback.
You can set the number of bytes to read before calling the function. This
should allow you to use DoEvents liberally within any call to LWP.

I have some questions regarding your program if you could contact me
off-list I would apprecaite it. I am new to Win32::GUI and forking and am
trying to do something very similar to what it looked like you were trying
to do. I am attempting to take a list of links from a ListView and send
them
each to a child for download. I am running into lots of problems with fork
and page faults that I can't seem to solve.

Cheers,
Michael



-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users

<<attachment: fork.zip>>

Reply via email to