Best as I can figure it though I haven't seen it written anywhere, so if anyone knows better, I to would like to hear the real skinny?
why name of threads hasn't capital letters, on the contrary to most of modules.
The threads::shared module acts in a vaguely pragma-like fashion in as much as, if threads has not been loaded prior to threads::shared, then the facilities provided by the latter do not cause errors, but act as no-ops. Ie. They silently do nothing.
The intention being (I think), that authors could write modules, that need to use my $var :shared;, share() and lock() etc. if they are running in a threaded program, but not, if they were not.
By making threads::shared silently do nothing unless threads was loaded, it (theoretically), allowed the authors to avoid having to hard code explicit tests for threads into their modules.
The naming of threads all lower case was necessary so that the name of threads::shared could also be all lower case.
Whether the aim of creating transparently 'dual mode' modules is actually achievable I'm doubtful.
if thread module is outdated, why not combine thread::whatever to threads?
By "thread module", I assume you mean Thread. Basically because of history I think--nothing is ever deleted from CPAN so renaming things is a problem.
I wish that there was some sensible action that could be taken to avoid the confusion between those Thread::* modules that work with threads and those that were written for use with Thread and either haven't or cannot be modified for use with the former.
In reply to Re: name of threads
by BrowserUk
in thread name of threads
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |