2 use Thread qw(cond_wait cond_broadcast);
6 Thread::Queue - thread-safe queues
11 my $q = new Thread::Queue;
12 $q->enqueue("foo", "bar");
13 my $foo = $q->dequeue; # The "bar" is still in the queue.
19 return bless [@_], $class;
23 use attrs qw(locked method);
25 cond_wait $q until @$q;
30 use attrs qw(locked method);
32 push(@$q, @_) and cond_broadcast $q;