The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

threads::shared - Perl extension for sharing data structures between threads

SYNOPSIS

  use threads::shared;

  tie my %hash  , 'threads::shared';
  tie my @array , 'threads::shared';
  tie my $scalar, 'threads::shared';

  lock(\%hash);
  unlock(\%hash);
  cond_wait($scalar);
  cond_broadcast(\@array);
  cond_signal($scalar);

DESCRIPTION

EXPORT

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

SEE ALSO

perl threads