Jeremy, I assume you are probably running the POE version installed through ActiveStates ppm. This seems to have issues and I found that by installing through CPAN that there is a newer version of POE that seems to have a lot of performance issues fixed. Rather than installing through active states ppm (which seems to be behind a few POE versions), you can install POE through CPAN:
perl -MCPAN -e "install POE" See if that helps at all. Z On 6/24/07, Jeremy Palmer <[EMAIL PROTECTED]> wrote:
Hi, I'm building a Win32 POE application that need to make a non-blocking call to a function in an external Perl package. This function takes references to Perl objects and array references (however no subroutine refs). I've looked at the options for completing this sort of task with POE::Component::Child & Wheel::Run + Filter::Reference, however there seems to be one limiting factor here - Win32 fork emulation. The Win32 fork emulation seems very buggy. In tests I've used with Wheel::Run I get fork failures (i.e. "fork() failed: Resource temporarily unavailable") after the 64 calls of fork from the parent process. See the attached simple example that demos the error: use strict; use warnings; my $COUNT = 0; my $MAXFORK = 2**6; while ( $COUNT <= $MAXFORK ) { my $pid = fork(); die "fork() failed: $!" unless defined $pid; if ($pid) { $COUNT++; print "Fork count $COUNT\n"; } else { # in child exit(0); } } Also when running a code subroutine, passing in variables, with Wheel::Run and Filter::Reference I get huge memory leaks after the forked off child thread exits. I can't exactly track where the leaks are occurring, but it seems to have something to do with including packages at runtime using the "require" keyword. I also get the same issues with POE::Component::Child which is no surprise considering it also uses Wheel::Run + Filter::Reference. I was hoping if someone might have any suggestions as to how I might come up with a solution to this problem. Moving from Win32 to *NIX is not an option. I have thought about using Win32::Process and running a Perl process in the background (so the kernel can take responsibility for the memory allocation etc) and then having a POE delayed event that checks every second or so to see if the process is complete. I'm however unsure on how to pass specific runtime variables to the spawned off Perl process. Any help on fixing POE::Wheel::Run or providing another solution would be greatly appreciated. I'm using WinXP SP2, ActiveState Perl v5.8.8 Build 820 and POE 0.9917. Thanks Jeremy ______________________________________________________________________________________________________ This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or [EMAIL PROTECTED]) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank you. ______________________________________________________________________________________________________