Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Suppressing thread warnings

by CardinalNumber (Prior)
on Oct 10, 2008 at 17:25 UTC ( #716494=note: print w/replies, xml ) Need Help??

in reply to Suppressing thread warnings

The warnings pragma has a threads category, so maybe...
use strict; use warnings; no warnings qw[threads]; use threads; my $thread1 = new threads(\&my_sub); my $thread2 = new threads(\&my_sub); sub my_sub {} exit; # needs explicit exit for reasons beyond me
It's been a while since I tangled with threads, but the above quiets the warnings with 5.10 on Win32.

Addendum: See also the "WARNINGS" section of the documentation.

Replies are listed 'Best First'.
Re^2: Suppressing thread warnings
by AnomalousMonk (Canon) on Oct 10, 2008 at 17:40 UTC
Re^2: Suppressing thread warnings
by lennysan (Novice) on Oct 10, 2008 at 20:21 UTC
    This didn't suppress this specific warning :(

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716494]
[ambrus]: choroba: heh heh... I have such a doc bug report somewhere. fixed by now.
[Corion]: Once upon a time I had automatic tests for checking the synopsis, but I stopped doing that because the setup was too fragile on CPAN testers for extracting code from the SYNOPSIS.
[Corion]: Maybe I should move the extraction of the code from the SYNOPSIS section into the author tests, or something like that...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-02-27 12:08 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (383 votes). Check out past polls.