in reply to Re: OO and Threads conflict?
in thread OO and Threads conflict?
$self will become invalid if the object goes out scope before thread function reader exits.(Disclaimer: I'm not sure I'm following what you're saying.) That said, this ain't C++ so $self is a reference, not a pointer, and unlike pointers, references are smart. If the variable goes out of scope in one place but is also referenced from another scope, it won't become "invalid". (What's that, anyway? Do you mean undef? Dangling pointer (no such thing in Perl)? Or something else?) You might want to look into closures.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: OO and Threads conflict?
by beamsack (Scribe) on Sep 21, 2002 at 23:07 UTC | |
by Anonymous Monk on Sep 22, 2002 at 12:42 UTC |