in reply to Re^4: yet another thread question: is Symbol::gensym threadsafe? (history)
in thread yet another thread question: is Symbol::gensym threadsafe?

The generated name can be output when the file handle is dumped ...

So, even though the name is deleted from the symbol table, it can still be recovered from somewhere?

And if it can be recovered from somewhere, then there is the possibility of conflict. Either in where the names are being stored for recovery. Or even in that someone, somewhere may be using those recovered names, assuming them to be unique.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^5: yet another thread question: is Symbol::gensym threadsafe? (history)

Replies are listed 'Best First'.
Re^6: yet another thread question: is Symbol::gensym threadsafe?
by ikegami (Patriarch) on Oct 24, 2007 at 17:03 UTC

    So, even though the name is deleted from the symbol table, it can still be recovered from somewhere?

    Yes.

    >perl -le "my $g = \do{ local *GLORB; *GLORB }; print $g; print *$g" GLOB(0x225f08) *main::GLORB

    But that's not a problem, or at least not a new one, because the globs created by auto-vivification of lexicals are not uniquely named either. Your hypothicical "someone" doesn't support lexical file handles, so I wouldn't worry about his inability to support threading.