in reply to How do I used a threaded subroutine inside a perl object
In a situation like this, I'd suggest using a closure that holds your object reference.
my $thing = new thing(); my $closure = sub { $thing->stuff_to_do(); }; my $thread = threads->create($closure);
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I used a threaded subroutine inside a perl object
by Anonymous Monk on Jul 03, 2013 at 01:55 UTC | |
|
Re^2: How do I used a threaded subroutine inside a perl object
by adamcpfeiffer (Novice) on Jul 03, 2013 at 12:34 UTC |