Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Think about Loose Coupling
 
PerlMonks  

Thread::Suspend uploaded

by liz (Monsignor)
on Aug 22, 2003 at 13:36 UTC ( #285770=note: print w/ replies, xml ) Need Help??


in reply to Missing (i)threads Features?

Just uploaded Thread::Suspend to my personal CPAN directory. From the POD:

NAME
       Thread::Suspend - suspend and resume threads from another thread

SYNOPSIS
           use Thread::Suspend;             # exports suspend() and resume()
           use Thread::Suspend qw(suspend); # only exports suspend()
           use Thread::Suspend ();          # threads class methods only

           my $thread = threads->new( sub { whatever } );
           $thread->suspend;                # suspend thread by object
           threads->suspend( $thread );     # also
           threads->suspend( $tid );        # suspend by thread ID
           threads->suspend;                # suspend all (other) threads

           $thread->resume;                 # resume a single thread
           threads->resume;                 # resume all suspended threads
Unfortunately, this depends on Thread::Signal, so it currently only works on Linux.

Liz


Comment on Thread::Suspend uploaded

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://285770]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-04-20 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls