Thread::Tie

Thread::Tie can tie variables into a thread of their own.
Download

Thread::Tie Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Elizabeth Mattijsen
  • Publisher web site:
  • http://search.cpan.org/~elizabeth/

Thread::Tie Tags


Thread::Tie Description

Thread::Tie can tie variables into a thread of their own. Thread::Tie can tie variables into a thread of their own.SYNOPSIS use Thread::Tie; # use as early as possible for maximum memory savings # use default thread + tieing + create thread when needed tie $scalar, 'Thread::Tie'; tie @array, 'Thread::Tie'; tie %hash, 'Thread::Tie'; tie *HANDLE, 'Thread::Tie'; # use alternate implementation tie $scalar, 'Thread::Tie', { module => 'Own::Tie::Implementation', # used automatically use => 'Use::This::Module::Also', # optional, also as [] eval => 'arbitrary Perl code', # optional }; # initialize right away tie $scalar, 'Thread::Tie', {}, 10; tie @array, 'Thread::Tie', {}, qw(a b c); tie %hash, 'Thread::Tie', {}, (a => 'A', b => 'B', c => 'C'); tie *HANDLE, 'Thread::Tie', {},'>:layer','filename'; # create an alternate thread and use that my $tiethread = Thread::Tie::Thread->new; tie $scalar, 'Thread::Tie', {thread => $tiethread}; # object methods my $tied = tie stuff,'Thread::Tie',parameters; my $tied = tied( stuff ); my $semaphore = $tied->semaphore; # scalar for lock()ing tied variable my $module = $tied->module; # module tied to in thread my $tiethread = $tied->thread; # thread to which variable is tied my $tid = $tiethread->tid; # thread id of tied thread my $thread = $tiethread->thread; # actual "threads" thread untie( stuff ); # calls DESTROY in thread, cleans up thoroughly Thread::Tie->shutdown; # shut down default handling thread $tiethread->shutdown; # shut down specific threadRequirements:· Perl


Thread::Tie Related Software