Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: How can I force thread switching?

by BrowserUk (Patriarch)
on Sep 29, 2013 at 19:15 UTC ( [id://1056256]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for my $i ( 0 .. 50 ) {
        queueProcessRequest( $i );
    }
    
  2. or download this
        while (my $job = $dispatcher->dequeue()) {
    
  3. or download this
    #!/usr/bin/perl -lw
    use strict;
    ...
        queueProcessRequest( $i );
    }
    endThreadedOperation();
    
  4. or download this
    #!/usr/bin/perl -lw
    use strict;
    ...
    $Q->nq( $_ ) for 1 .. 50;
    $Q->nq( (undef) x $T );
    $_->join for @threads;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found