[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1834612 - in /subversion/branches/1.10.x-issue4758/subversion: libsvn_client/shelve.c tests/cmdline/shelve_tests.py

From: Julian Foad <julianfoad_at_apache.org>
Date: Fri, 13 Jul 2018 13:03:32 +0100

Philip, can you help clarify this?

Daniel Shahaf wrote on 2018-07-02:
> Julian Foad wrote on Mon, 02 Jul 2018 12:20 +0100:
> > Philip Martin wrote:
> > > I did also worry about thread safety: it's not safe to modify the
> > > context like that if the context can be shared across multiple threads.
> > > However the context also includes batons and those typically point to
> > > mutable data which cannot be shared across threads either. I suppose we
> > > should document that a client should only access a context from one
> > > thread at a time.
> >
> > Documenting that sounds reasonable. Like this, just above typedef struct
> > svn_client_ctx_t, do you think?
> > [[[
> > /**
> > * Client context
> > *
> > + * A client should only access a context from one thread at a time, as
> > + * the context includes batons that typically point to mutable data which
> > + * cannot be safely shared across threads.
> > + *
> > * @defgroup clnt_ctx Client context management
> > *
> > * @{
> > */
> > ]]]
>
> It's not clear to me from the added paragraph whether the restriction
> "only access the context from a thread at a time" is imposed by the
> library implementation or by the way API consumers' code is typically
> structured. That is: if a client is careful to use mutexes in his
> batons, or for that matter passes NULL for all batons, would the
> restriction still apply?

- Julian
Received on 2018-07-13 14:03:44 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.