One of my favorite programming techniques is to set up a successive series of filters using forked pipes--one child gets the data I want, the next one performs some operations on it to get only the data I want, while the last prepares the data for output.

This works fine in Unix Perls, but in 5.6.x, the Windows fork emulation had... issues. This was due to a problem in the new ithreads model, as the regex engine caused some race conditions. This would result in programs that worked fine most of the time, but sometimes certain inputs would cause perl to crash. Sometimes, this crash could be eliminated just by switching two lines of code around. In other words, it wasn't terribly predictable.

So I now find myself getting ready to write another program that will successively filter data; however, it needs to run under Windows. I have some other ideas how to avoid forking, but they all make the program much more complicated than I would like. So here's my question (finally): has anyone worked with fork emulation since the regex issues were resolved (in one of the 5.7.x's)? If so, have you had any problems you've attributed to other fork emulation problems?

If you haven't worked with fork emulation (because you don't code for Windows or don't fork there), has anyone used ithreads enough to comment on their stability? Fork emulation is based on ithreads, so if they are stable, I would guess fork is almost as good.

I realize that fork emulation/ithreads are definitely not perfect and that there are still bugs and limitations listed in the docs--particularly the possibility of bugs in XS modules. However, none of those are issues that I'm worried about at the moment. I just want to know if there are still misc. bugs that will cause me problems.


In reply to Perl 5.8.0 fork emulation by Ionitor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.