On Wed, Nov 20, 2013 at 6:00 PM, Julian Foad <julianf...@btopenworld.com>wrote:

> > URL: http://svn.apache.org/r1540590
>
>
> > Added: subversion/trunk/subversion/libsvn_subr/object_pool.c
> >
> ==============================================================================
> [...]
> > +/* Cleanup function called when an object_ref_t gets released.
> > + */
> > +static apr_status_t
> > +object_ref_cleanup(void *baton)
> > +{
> > +  object_ref_t *object = baton;
> > +  svn_object_pool__t *object_pool = object->object_pool;
> > +
> > +  SVN_INT_ERR(svn_mutex__lock(object_pool->mutex));
>
> This doesn't do quite what you might think. (And it's doc string is not
> clear about this.) It also prints out the error message. I don't think
> that's what you want here.
>

Thanks for pointing that out, Julian!


> [...]
> > +  SVN_INT_ERR(svn_mutex__unlock(object_pool->mutex, NULL));
>
> And again.
>

I think there is no real point in continuing program execution once
mutexes / thread synchronization fail in resource management code.
r1544027 attempts a clean exit in that case.

-- Stefan^2.

Reply via email to