NAME
threads::shared - Perl extension for sharing data structures between threads
SYNOPSIS
use threads::shared;
my($foo, @foo, %foo);
share(\$foo);
share(\@foo);
share(\%hash);
my $bar = share([]);
$hash{bar} = share({});
lock(\%hash);
unlock(\%hash);
cond_wait($scalar);
cond_broadcast(\@array);
cond_signal($scalar);
DESCRIPTION
This modules allows you to share() variables. These variables will then be shared across different threads (and pseudoforks on win32). They are used together with the threads module.
EXPORT
share(), lock(), unlock(), cond_wait, cond_signal, cond_broadcast
BUGS
Not stress tested! Does not support references Does not support splice on arrays! The exported functions need a reference due to unsufficent prototyping!
AUTHOR
Artur Bergman <lt>artur at contiller.se<gt>
threads is released under the same license as Perl