ConfigWriter: synchronize access
authorGuido Trotter <ultrotter@google.com>
Tue, 8 Jul 2008 08:40:51 +0000 (08:40 +0000)
committerGuido Trotter <ultrotter@google.com>
Tue, 8 Jul 2008 08:40:51 +0000 (08:40 +0000)
commitf78ede4ef6f6e93f3541361518c0d2d73643e25c
tree561d74dc8a0ca335970b576aacf675a845ec29f5
parent42a999d1a3bbf9911dd2de149b02ad5354dd8261
ConfigWriter: synchronize access

Since we share the ConfigWriter we need somehow to make sure that
accessing it is properly synchronized. We'll do it using the
locking.ssynchronized decorator and a module-private shared lock.

This patch also renames a few functions, which were called inside the
ConfigWriter, to a private version _UnlockedFunctionName, and exports
the synchronized public ones. The internal callers, which are already
synchronized, are then changed to use the _Unlocked version, to prevent
double locking.

Reviewed-by: iustinp
lib/config.py