threads::shared(3p) Perl Programmers Reference Guide threads::shared(3p)
threads::shared(3p) Perl Programmers Reference Guide threads::shared(3p) # threads::shared(3p) Perl Programmers Reference Guide threads::shared(3p) NNAAMMEE # threads::shared - Perl extension for sharing data structures between threads VVEERRSSIIOONN # This document describes threads::shared version 1.64 SSYYNNOOPPSSIISS # use threads; use threads::shared; my $var :shared; my %hsh :shared; my @ary :shared; my ($scalar, @array, %hash); share($scalar); share(@array); share(%hash); $var = $scalar_value; $var = $shared_ref_value; $var = shared_clone($non_shared_ref_value); $var = shared_clone({'foo' => [qw/foo bar baz/]}); $hsh{'foo'} = $scalar_value; $hsh{'bar'} = $shared_ref_value; $hsh{'baz'} = shared_clone($non_shared_ref_value); $hsh{'quz'} = shared_clone([1. ...