> On Apr 5, 2017, at 6:42 AM, Branko Čibej <br...@apache.org> wrote: > > On 05.04.2017 12:39, Yann Ylavic wrote: >> On Wed, Apr 5, 2017 at 12:27 PM, Branko Čibej <br...@apache.org> wrote: >>> On 05.04.2017 12:19, Yann Ylavic wrote: >>>> On Tue, Apr 4, 2017 at 10:57 PM, Jim Jagielski <j...@jagunet.com> wrote: >>>>>> On Apr 4, 2017, at 4:29 PM, Yann Ylavic <ylavic....@gmail.com> wrote: >>>>>> >>>>>> >>>>>> I'm not a big fan of the "sleep" fallback implementation. >>>>>> >>>>> Feel free to replace it with something better. >>>> Would an implementation based on a pipe (hence two FDs per mutex) be >>>> acceptable? >>> The default open-file limit on the Mac is a paltry 256, I'm not sure >>> it'd be a good idea for APR to suddenly start using up file descriptors >>> for timed waits on mutexes. >> Yes, that was my fear... >> >>> Couldn't we use a condition variable for this? >> We can for thread-mutexes (was the case before this commit), but not >> for proc-mutexes since OSX also lacks pshared condvars (i.e. >> PTHREAD_CONDATTR_SETPSHARED). > > Not according to the header files. The declaration is there, available > since OSX 10.4 and iOS 2.0, which I'd say means it's pretty much > available always. >
Hmmm.... last I checked, the pthread_condattr_setpshared() was considered buggy under OSX (and defined but not even in the man pages) and was avoided. However, looking at various repos out there, that may no longer be the case as of 10.7/10.8... +1 for trying to use it