Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 wandering the Monastery: (15)
As of 2015-07-31 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (281 votes), past polls