Thread::Stack

Thread-safe stacks adapted from Thread::Queue
Download

Thread::Stack Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Kyle Schlansker
  • Publisher web site:
  • http://search.cpan.org/~kylesch/

Thread::Stack Tags


Thread::Stack Description

Thread-safe stacks adapted from Thread::Queue A stack, as implemented by the Thread::Stack module is a thread-safe data structure much like a list. Any number of threads can safely add or remove elements to or from the beginning of the list. (Stacks don't permit adding or removing elements from the middle of the list).SYNOPSIS use Thread::Stack; my $s = new Thread::Stack; $s->push("foo", "bar"); my $bar = $s->pop; # The "foo" is still in the stack. my $foo = $s->pop_nb; # returns "foo", or undef if the stack was empty my $size = $s->size; # returns the number of items still in the stack Requirements: · Perl


Thread::Stack Related Software