Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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

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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-09-25 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (472 votes). Check out past polls.