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

Re: Context parameter in public API

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-10-12 07:23:39 CEST

Karl Fogel <kfogel@newton.ch.collab.net> writes:
> > It can be. If a library which has to be thread-safe wants to do
> > Subversion operations, it can't be sure that two instances of itself
> > don't do "startup time" stuff at the same time.
>
> What's wrong with two instances reading?
>
> (Subversion doesn't modify those files, it just reads them.)
>
> Sorry, not being deliberately obtuse here, I'm just not seeing the
> mechanism by which this *particular* instance of globality is
> problematic...

Let me be clearer: possibly the initialization code will need to be
careful, sure. It will need to get a mutex on the data structure, and
then when it has the mutex, check some flag in the data structure to
determine if config initialization has already been completed. IOW,
I'm certainly not saying we can ignore thread issues here, just that
it seems to [possibly naive] me that they're quite solveable...

But I'm not an experienced multi-threaded programmer, so perhaps I'm
missing something.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 12 07:51:25 2002

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.