I am starting to use mutithreading in an application that is unit tested with PerlUnit. The problem is that part of the application uses a module called KinoSearch, which is not thread safe. The following page: http://perldoc.perl.org/threads.html#BUGS-AND-LIMITATIONS says that you can get around the issue by loading the non-thread-safe module only at a time when you know that no new threads won't be spawned. This is completely uinrealistic when you are running a bunch of unit tests with PerlUnit. I have several unit tests which create instances of various classes and exercise them in certain ways. Some of these classes will be spawning new threads, and some won't. PerlUnit gives me no control whatsoever on the order in which tests are being carried out. And even if it did, I have many different tests which spawn new threads, so it's pretty hard to determine a point where no new threads will be created. How do people deal with this issue? Thx Alain Désilets

In reply to UnitTesting multi-threaded apps by alain_desilets

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.