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

Thread safety warnings (repos vs. fs)

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-04-06 07:26:24 CEST

In svn_fs.h, we find in the docstring for svn_fs_open() the following:

 * Only one thread may operate on any given filesystem object at once.
 * Two threads may access the same filesystem simultaneously only if
 * they open separate filesystem objects.
 *
 * @note You probably don't want to use this directly. Take a look at
 * svn_repos_open() instead.

Upon hopping over the svn_repos.h, though, and checking the docstring for
svn_repos_open() and svn_repos_fs(), we find no warnings whatsoever about
multiple threads accessing the same svn_repos_t object.

Should we be giving similar warnings for svn_repos_open()? Some reasons I
can think of why *not* to include:

  - the fact that multiple threads *can* operate on the repos object
    itself so long as they aren't using it with functions that access
    its underlying FS object

  - if followed through to completion, this would wind up being situation
    that would have us propogating warnings all the back through ra_local
    and to the client APIs

(Of course, there might be other reasons, , too, like, "Mike overlooked
something.")

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Fri Apr 6 07:26:52 2007

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.