Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Threads From Hell #3: Missing Some Basic Prerequisites

by karlgoethebier (Abbot)
on May 30, 2015 at 17:30 UTC ( [id://1128419]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    * * * * * * * * * * * * * * * * * * * * 
    * * * * * * * * * * * * * * * * * * * *
    ...
    x x x x x x x x x x x x x x x x x x x x
    x x x x x x x x x x x x x x x x x x x x
    x x x x x x x x x x x x x x x x x x x x
    
  2. or download this
    x x x x x x x x x x x x x x x x x x x x
    x x x x x x x x x x x x x x x x x x x x
    ...
    x x x x x x x x x x x x x x x x x x x x
    x x x x x x x x x x x x x x x x x x x x
    x x x x x x x x x x x x x x x x x x x x
    
  3. or download this
    [
      [[0, 0], [0, 1], [0, 2], [0, 3]],
    ...
      [[2, 0], [2, 1], [2, 2], [2, 3]],
      [[3, 0], [3, 1], [3, 2], [3, 3]],
    ]
    
  4. or download this
    my $queue = Thread::Queue->new();
    $queue->enqueue(\@rows);
    my @threads = map { threads->create( \&process, $queue ); } 1 .. 4;
    ...
    
  5. or download this
    if ( $div == 0 ) {
        $image->setpixel( x => $x, y => $y, color => $black );
    ...
    else {
        $image->setpixel( x => $x, y => $y, color => $palette[$color] );
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-16 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found