develooper Front page | perl.perl5.porters | Postings from March 2003

Re: [PATCH] sig_num, etc.

Thread Previous | Thread Next
Jarkko Hietaniemi
March 17, 2003 10:50
Re: [PATCH] sig_num, etc.
Message ID:
> >Can the home-grown version be made threadsafe? Is it threadsafe?
> (Does anyone care?)
> The home-grown version does begin its argument list with pTHX_.   I
> will try to read up in the threading docs and see if there's anything
> else we should be doing that we're not, such as locking around
> certain bits of code.  I'm not that experienced in this area so if

Threadsafety of readdir(_r) probably should make the data structure
received from opendir() and iterated over by readdir() cloned (or at
least clone the "current entry pointer") into the thread local data
storage of each thread so that alternate threads don't get a random
selection of directory entries.  (Of course, the directory contents
could change while the code is executing, but that's the case even
with singlethreaded code).

> anyone has specific suggestions they are welcome.

Jarkko Hietaniemi <> "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About