RE: How Troublesome Is "Scalars Leaked" Warning?

[email protected] ("Jack Steadman")
Newsgroups perl.ithreads
Message-ID <[email protected]>
> I'm getting a "scalars leaked" warning from an independent thread after
> it finishes and detaches from another thread in my program.   I was
> curious if this was an artifact of ithreads in Perl v5.8 and also if I
> should be concerned in a production environment.

i can't offer a real explanation for why it happens, but i have a threaded
application which makes extensive use of sockets, and these warnings pour
out of it any time a thread that uses a socket gets joined or detached.  it
seems to happen only after the socket has been in a connected state,
though - sockets which never connect don't seem to produce the warnings.

my theory was that it had something to do with IO::Socket not being totally
thread-safe.  i've been meaning to try and remove all of my 'use
IO::Socket::INET' and replace them with either a basic require or
Thread::Use's useit to see if i could delay loading of the module until
after all threads were spawned.  i haven't been able to try that yet, but i
suspect that the warnings might go away.

at any rate, it seems to have no effect on program execution.  sockets seem
to function normally.  i've been running this in production for a while now
and have had no troubles related to this.

jack
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.