Re: Remove useless lock around opendir/readdir
On Fri, Mar 27, 2015 at 2:50 AM, Carlos Martín Nieto wrote: > A call to opendir thread-safe and the readdir calls only share the buffer > within the same directory stream, which is local to this function. Therefore > this lock does not buy us anything. committed, thanks Philip Guenther
Re: Remove useless lock around opendir/readdir
> On Mar 30, 2015, at 12:11 AM, Philip Guenther wrote: > > On Fri, Mar 27, 2015 at 2:50 AM, Carlos Martín Nieto wrote: >> A call to opendir thread-safe and the readdir calls only share the buffer >> within the same directory stream, >> which is local to this function. Therefore this lock does not buy us >> anything. > > Yep. > > Heads up on this, bcook, in case the Windows opendir/readdir emulation > isn't thread-safe (unlikely). > > > Philip Guenther > Thanks. We're currently inheriting that emulation from mingw-w64's runtime, which wraps _findfirst/_findnext. It is thread safe.
Re: Remove useless lock around opendir/readdir
On Fri, Mar 27, 2015 at 2:50 AM, Carlos Martín Nieto wrote: > A call to opendir thread-safe and the readdir calls only share the buffer > within the same directory stream, > which is local to this function. Therefore this lock does not buy us anything. Yep. Heads up on this, bcook, in case the Windows opendir/readdir emulation isn't thread-safe (unlikely). Philip Guenther