summaryrefslogtreecommitdiff
path: root/dist/Thread-Queue
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-09-03 21:57:43 -0600
committerKarl Williamson <khw@cpan.org>2015-09-03 23:10:36 -0600
commit6c5826743fef29ff17b421f17c5b09902acb164c (patch)
tree41a9107b70017f9381e772a4aee8cd276227bb99 /dist/Thread-Queue
parentf185f65418467d10121bac955af6bca4776490e3 (diff)
downloadperl-6c5826743fef29ff17b421f17c5b09902acb164c.tar.gz
Fix some pedantic pod erros in Thread::Queue
Diffstat (limited to 'dist/Thread-Queue')
-rw-r--r--dist/Thread-Queue/lib/Thread/Queue.pm20
1 files changed, 11 insertions, 9 deletions
diff --git a/dist/Thread-Queue/lib/Thread/Queue.pm b/dist/Thread-Queue/lib/Thread/Queue.pm
index ebc1c31749..b1842ca97b 100644
--- a/dist/Thread-Queue/lib/Thread/Queue.pm
+++ b/dist/Thread-Queue/lib/Thread/Queue.pm
@@ -488,9 +488,10 @@ C<limit> does not prevent enqueuing items beyond that count:
my $q = Thread::Queue->new(1, 2);
$q->limit = 4;
$q->enqueue(3, 4, 5); # Does not block
- $q->enqueue(6); # Blocks until at least 2 items are dequeued
-
- my $size = $q->limit; # Returns the current limit (may return 'undef')
+ $q->enqueue(6); # Blocks until at least 2 items are
+ # dequeued
+ my $size = $q->limit; # Returns the current limit (may return
+ # 'undef')
$q->limit = 0; # Queue size is now unlimited
=item ->end()
@@ -514,7 +515,8 @@ while it is being examined and/or changed, L<lock|threads::shared/"lock
VARIABLE"> the queue inside a local block:
{
- lock($q); # Keep other threads from changing the queue's contents
+ lock($q); # Keep other threads from changing the queue's
+ # contents
my $item = $q->peek();
if ($item ...) {
...
@@ -593,11 +595,11 @@ of the queue (similar to C<dequeue_nb>) if the count overlaps the head of the
queue from the specified position (i.e. if queue size + index + count is
greater than zero):
- $q->enqueue(qw/foo bar baz/);
- my @nada = $q->extract(-6, 2); # Returns () - (3+(-6)+2) <= 0
- my @some = $q->extract(-6, 4); # Returns (foo) - (3+(-6)+4) > 0
- # Queue now contains: bar, baz
- my @rest = $q->extract(-3, 4); # Returns (bar, baz) - (2+(-3)+4) > 0
+ $q->enqueue(qw/foo bar baz/);
+ my @nada = $q->extract(-6, 2); # Returns () - (3+(-6)+2) <= 0
+ my @some = $q->extract(-6, 4); # Returns (foo) - (3+(-6)+4) > 0
+ # Queue now contains: bar, baz
+my @rest = $q->extract(-3, 4); # Returns (bar, baz) - (2+(-3)+4) > 0
=back