【发布时间】:2014-06-06 10:44:37
【问题描述】:
我有一个大约 10000 个数据的大数组,想用 parallel::forkmanager 处理它
如何处理 1000 块的数据我有以下代码:
my $MAX_PROCESSES = 10;
my $pm = new Parallel::ForkManager($MAX_PROCESSES);
for (<>) {
my $pid = $pm->start and next;
# here i want to process my data on chunks of 1000 with 10 parallel::formanagaer
$pm->finish;
}
如何自定义我的代码来做到这一点?
【问题讨论】: