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

Re: A proposed solution for svn admin directory names

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2005-06-29 20:18:27 CEST

C. Michael Pilato wrote:

> I'll demonstrate a little ignorance here, perhaps, but isn't thread
> safety all about making sure different threads wouldn't get different
> data or stomp on each other's data? It would seem that this wouldn't
> really be likely to happen here. If you can safely assume that all
> threads of a single application would have the same environment (which
> might not be a safe assumption?), then at any given time, each thread
> would either have szAdmDir set to 0 or to some string which would have
> be the same string across all threads anyway.
>
> Now, about that ignorance -- what did I miss?

And if pointer updates are atomic on the platform in question you're
right, it doesn't matter one way or the other. But what if they aren't?
  Then you can read that pointer and get a half-updated value, which is
no longer zero, so you say "oh, i follow this to get the value" and go
off into never-never land and crash. It's not likely to happen, pointer
updates are generally atomic, but it is platform specific and not
required by the standard.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 29 20:21:14 2005

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.