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

Re: [PATCH] configure.com: sig_num, etc.

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
March 17, 2003 10:50
Subject:
Re: [PATCH] configure.com: sig_num, etc.
Message ID:
20030317185042.GM17126@vipunen.hut.fi
> >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 <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About