Thanks,
I've uploaded 0.005_02 which uses an entirely different approach.
In 0.005_01 I tried to use the CLONE() mechanism to do what perl does
for perl data structures and duplicate the queue into the new thread.
This worked fine for ithreads, but not for fork() emulation.
Unfortunately by the time CLONE() runs there isn't enough information
to detect whether a pseudo-fork() or a thread->create() is being done,
and to update the stash list used for CLONE() calls.
So what I've done is to implemente the CLONE_SKIP() method added in
5.8.7, so that the fork() child process will receive a non-blessed
reference instead of a queue object.
This works fine for the sample code you linked to.
Tony
On Fri, Mar 13, 2009 at 09:40:14AM -0400, Andrew Feren via RT wrote:
Show quoted text> Queue: POE-XS-Queue-Array
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=43902 >
>
> 0.005_01 still fails. (only tested on Win32)
>
> My test consisted of
>
> 1. copied
http://poe.perl.org/?POE_Cookbook/Child_Processes_3 to use
> a test case
> 2. Ran test script successfully
> 3. build and install POE-XS-Queue-Array
> 4. Rerun the test script.
> 1. failed. The script died right after the first task ran.
> 5. Removed POE-XS-Queue-Array
> 6. Rerun the test script.
> 1. success
>
> If you have other patches I'll be happy to give them a try. In a few
> weeks I'll have a little time and can try and get some more info about
> exactly where the crash is occurring.
>
> Thanks,
> -Andrew
>
> TONYC via RT wrote:
> > <URL:
https://rt.cpan.org/Ticket/Display.html?id=43902 >
> >
> > On Fri Mar 06 10:08:58 2009, acferen@yahoo.com wrote:
> >
> >> Everything works fine until a thread finishes. As soon as a thread
> >> stops running the entire perl app closes with memory errors.
> >>
> >
> > I've uploaded POE-XS-Queue-Array 0.005_01 to CPAN, if you could give it
> > a go I'd appreciate it.
> >
> > Tony
> >
> >
> >