#!/usr/bin/perl use strict; use warnings; use MCE::Loop; our $fu = 0; MCE::Loop::init { max_workers => 8, chunk_size => 1000 }; mce_loop { do_work($_) } 1..10000000; print "Done: $fu\n"; sub do_work { $fu += $_[0] }
In reply to Getting started with MCE (the Many-Core Engine) by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |