diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2007-02-12 04:04:33 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-02-15 09:34:01 +0000 |
commit | 878090d5582120ef9336936d4fc06895b4fd242a (patch) | |
tree | b937d124e5c21f6581ac096678f212c38b29f246 /lib/Thread | |
parent | e9950d3b0610b91bb9d19cb0918fe7e81505fd79 (diff) | |
download | perl-878090d5582120ef9336936d4fc06895b4fd242a.tar.gz |
Use newer 'threads' constructs
From: "Jerry D. Hedden" <jdhedden@yahoo.com>
Message-ID: <844555.64815.qm@web30202.mail.mud.yahoo.com>
p4raw-id: //depot/perl@30310
Diffstat (limited to 'lib/Thread')
-rw-r--r-- | lib/Thread/Queue.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Thread/Queue.t b/lib/Thread/Queue.t index 33c420b750..b0d8c0a3b8 100644 --- a/lib/Thread/Queue.t +++ b/lib/Thread/Queue.t @@ -27,7 +27,7 @@ sub ok { } sub reader { - my $tid = threads->self->tid; + my $tid = threads->tid; my $i = 0; while (1) { $i++; @@ -49,7 +49,7 @@ my $nthreads = 5; my @threads; for (my $i = 0; $i < $nthreads; $i++) { - push @threads, threads->new(\&reader, $i); + push @threads, threads->create(\&reader, $i); } for (my $i = 1; $i <= 20; $i++) { |