Depends on the threads-modell and the OS, I suppose?
And there are various other concurrency models...
The package is practically a global variable, so only meddling with the object is already a much cleaner design.
| [reply] |
Perl avoids concurrency at the global level using clones of all globals for each thread. You can still break things with XS though. I don't know if the cloning of globals extends down into the magic structures backing the 'overload' feature, but I'd consider it a bug if it didn't.
| [reply] |