Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 contemplating the Monastery: (5)
As of 2014-12-27 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls