# Locking is necessary via the TIE interface. # Below, set and get are called separately behind the scene ( 2 IPC statements ). my $m1 = MCE::Mutex->new(); tie my @a1, 'MCE::Shared'; $m1->lock; my $v0 = $a1[0] = "item0"; $m1->unlock; # Locking is optional at the application level when using the OO interface. # This is made possible by the single point of entry. my $a2 = MCE::Shared->array(); my $v2 = $a2->set(0, "item2"); my $a3 = MCE::Shared->array(); my $v3 = $a3->[0] = "item3";