my $scalar : shared = 0; my %hash; $hash{key} = \$scalar; lock $hash{key};
I'm not sure how reliable that is when you start new threads though. You're probably better off just sticking with a few shared scalars in my opinion. Perl's threading isn't one of it's strongest features. At least you're not stuck with IPC.
-Paul
In reply to Re: Locking hash values
by jettero
in thread Locking hash values
by bucky0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |