in reply to How to get Blessed variables of a Class in the Thread Function in Perl?
That is because you neglected to pass $self as a parameter to the threaded call to threadFunc.
Try:
my $tid = threads->new(\&threadFunc , $self); # Syntax: $thr = threads +->create(FUNCTION, ARGS)
"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -Confucius
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to get Blessed variables of a Class in the Thread Function in Perl?
by PerlRider (Initiate) on Jan 10, 2013 at 08:26 UTC |
In Section
Seekers of Perl Wisdom