This is probably the reason why many of us say "don't use threads for this task".

Even though you admit to having made little (no?) use of threads?

If you encountered a bug in a regex, that allowed the regex to work but causes a warning during global destruction, would you advocate the replacement of all regexes using character by character comparisons and huge if/else cascades?

Eg. You'd advocate if( $string =~ m[C\d\[A-Q]] ) { with

my $currentChar = substr( $string, $n, 1 ); if( $currentChar eq 'C' ) { $currentChar = substr( $string, ++$n, 1 ); if( $currentChar eq '1' ) { $currentChar = substr( $string, ++$n, 1 ); if( $currentChar eq 'A' ) { ... ... ... ... elsif( $currentChar eq 'B' ... ... ... ... } elsif( $currentChar eq '2' ) { ... ... ... ... } elsif( $currentChar eq '3' ) { ... ... ... ... } elsif( $currentChar eq '4' ) { ... ... ... ... } elsif( $currentChar eq '5' ) { ... ... ... ... } elsif( $currentChar eq '6' ) { ... ... ... ... } elsif( $currentChar eq '7' ) { ... ... ... ... } elsif( $currentChar eq '8' ) { ... ... ... ... } elsif( $currentChar eq '9' ) { ... ... ... ... } else { die "The second char was not in range '1' thru '9'; } } else { die "The first character didn't match 'C'"; }

Because that is the logical equivalent of your advice!

Or might you suggest working around the problem, and report the error, in the hope that the regex engine would get fixed?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^4: Do I need threading for my GUI? by BrowserUk
in thread Do I need threading for my GUI? by tamaguchi

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.