Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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?
[ambrus]: Corion: schmorp points out https://metacpan. org/pod/release/ KARASIK/Prima-1. 49/pod/Prima/File. pod,
[ambrus]: so there's an IO waiter (Prima::File) and a timer (Prima::Timer) maybe it's possible to write an AnyEvent loop driver over it, a saner one than POE

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (15)
As of 2016-12-07 16:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (130 votes). Check out past polls.