in reply to Re^3: yet another thread question: is Symbol::gensym threadsafe?
in thread yet another thread question: is Symbol::gensym threadsafe?
simply a part of history from before local was available
No. local predates modules and so also predates the Symbol module.
The generated name can be output when the file handle is dumped and it is nice to be able to distinguish between two file handles in such debug output. Hence unique names are generated.
You also appear to have disproven your own argument that the numbers overlapping between threads might cause a problem, especially since your proposed solution to that problem is to eliminate the numbers. :)
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: yet another thread question: is Symbol::gensym threadsafe? (history)
by BrowserUk (Patriarch) on Oct 24, 2007 at 16:32 UTC | |
by ikegami (Patriarch) on Oct 24, 2007 at 17:03 UTC |