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

Re^3: How can I force thread switching?

by BrowserUk (Pope)
on Sep 29, 2013 at 19:15 UTC ( #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
Node Status?
node history
Node Type: note [id://1056256]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-04-16 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (436 votes), past polls