in reply to Re^12: Monitor list of threads running
in thread Monitor list of threads running

Why are you surprised? Perl 5.8.8 was released in 2006 on Februar the 1st. This was four years ago, and despite claims to the contrary, Perl development has not stalled since then.

Maybe now is a good time to do your own research instead of asking us to quote documentation or information found on the internet for you. Please read up on Yes, even you can use CPAN and A Guide to Installing Modules. Also see local::lib for a supposedly convenient way to maintain a local directory for your own modules without needing root or your own Perl installation.

Replies are listed 'Best First'.
Re^14: Monitor list of threads running
by mr_p (Scribe) on Apr 08, 2010 at 21:29 UTC
    I also wanted to say thanks for all your and everyones help from this site.
Re^14: Monitor list of threads running
by mr_p (Scribe) on Apr 09, 2010 at 15:29 UTC
    Hi Corion

    I installed this latest threads into a directory and wrote following code and still get this error message?

    Can't locate auto/threads/is_running.al in @INC (@INC contains: /nss/nfx/thread_libs/lib/ ....

    Would you know why? Is there a way I can tell what version of threads package it is using?

    #!/usr/bin/perl use lib "/ssy/nos/thread_libs/lib/"; use threads; my @threads; for (0 ..3) { my $thr = threads->create( sub { sleep 2; } ); $thr->detach(); push @threads, $thr; } # then later for my $thr ( @threads ) { print 'Thread ', $thr->tid, $thr->is_running() ? ' is running' : ' + is not running'; }

      Again, going back to where we already were, you can use the following snippet:

      perl -Mthreads -e 'use lib "/ssy/nos/thread_libs/lib/";die $threads::V +ERSION'

      ... or you can output the version information from your script:

      use threads; print "Using threads.pm version $threads::VERSION\n";

        I am still getting version 1.07 for threads.pm

        Here is what I did to install latest threads.

        1. downloaded threads-1.77.tar.gz 2. untared into /ssy/nos/threads_lib 3. cd /ssy/nos/threads_lib/threads-177 4. perl Makefile.PL PREFIX=/ssy/nos/threads_libs/lib 5. make 6. make test 7. make install 8. perl -Mthreads -e 'use lib "/ssy/nos/thread_libs/lib/";die $threads +::VERSION' I get: 1.07 at -e line 1.

        I also checked that threads.pm exist at location:

        /ssy/nos/thread_libs/lib/lib64/perl5/5.8.8/x86_64-linux-thread-multi/

        OK I finally got it working.

        gambit$ perl -Mthreads -e 'use lib "/ssy/nos/thread_libs/lib/lib64/per +l5/5.8.8/x86_64-linux-thread-multi/";die $threads::VERSION' I got 1.07 at -e line 1

        But If I run this. I get correct message

        #!/usr/bin/perl use lib "/ssy/nos/thread_libs/lib/lib64/perl5/5.8.8/x86_64-linux-threa +d-multi/"; use threads; print "Using threads.pm version $threads::VERSION\n"; Output: Using threads.pm version 1.77

        oh and also If I include path up to /ssy/nos/thread_libs/lib/lib64/ in perl script I get 1.07.

        Never the less I got it with you help. thanks so much again.

Re^14: Monitor list of threads running
by mr_p (Scribe) on Apr 08, 2010 at 21:27 UTC
    Surprising because this is what I got with RedHat 5 release.