I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-11-24 12:19:01-08 by jdeighan
something else that doesn't work for shared variables
It appears that you can't explicitly set the length of a shared list. For example:
use strict; use warnings; use threads; use threads::shared; my $lItems = [qw(a b c)]; $#$lItems -= 1; print("Length: " . scalar(@$lItems) . "\n"); my $lItems2 : shared = shared_clone([qw(a b c)]); $#$lItems2 -= 1; print("Length: " . scalar(@$lItems2) . "\n");
prints 2 for the first list, but prints 3 for the second. This should be added to the documentation (would have saved me many early morning hours of debugging)
Direct Responses: 11825 | Write a response