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

Re: svn commit: r21016 - in trunk: . subversion/include/private subversion/libsvn_fs_base/bdb subversion/libsvn_subr

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-08-10 00:08:15 CEST

On Wed, 09 Aug 2006, Greg Hudson wrote:

> On Aug 9, 2006, at 5:33 PM, Philip Martin wrote:
> >
> >Will this always be used in places where no parameters need to be
> >passed? How about:
> >
> > svn_error_t *
> > svn_atomic_init_once(volatile svn_atomic_t *global_status,
> > svn_error_t *(*init_func)(void *baton),
> > void *baton);
>
> Huh. Can you think of a case where it makes sense to pass parameters
> to an atomic initialization function? My intuition is that if you
> want to do that, your designed is subtly wrong.

Garrett also wrote:

> Generally, if it's something that only has to occur once it's a
> global initialization, which means you're initializing globals, so a
> baton is unnecessary, but I suppose someone might come up with a
> reason to pass one in, so sure, why not. Will look at adding one.

What if you needed to pass in some state (e.g. pool-like thing,
context, whatever) to determine how to initialize the globals?

  • application/pgp-signature attachment: stored
Received on Thu Aug 10 00:09:21 2006

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.