Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Thread; my $thr1; my $thr2; my $status = "1111"; print "Started\n"; $thr1 = new Thread \&sub1; $thr2 = new Thread \&sub2; sub sub2 { while (1) { print $status; } } sub sub1 { while (1) { $status = "0000"; print $status; } } $thr1->join; $thr2->join;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Beginner: Threads and Variables
by IlyaM (Parson) on Nov 14, 2002 at 10:10 UTC | |
|
Re: Beginner: Threads and Variables
by broquaint (Abbot) on Nov 14, 2002 at 12:16 UTC | |
by RMGir (Prior) on Nov 14, 2002 at 14:20 UTC |