[Zope] "Z2 CONFLICT Competing writes" and synchronization woes
Sean McGrath
sean@digitome.com
Thu, 31 Aug 2000 13:15:10 +0100
(Google -- which normally does an absolutely stunning job
of directing me to answers to Zope questions -- has
drawn a blank on this one:)
I have an external method that writes stuff to a file.
I want to synchronize access to the file so that
multiple callers can be adding stuff to the file
without problems.
Without any synchronization I get interleaved output
most of the time and occasionally an error message
like this:
"Z2 CONFLICT Competing writes at, /foo"
I tried using the threading module and creating
a Lock object as a global in the external method.
This does not help as each request gets allocated its
own Lock object. I tried Rlock got an error message
I didn't understand and concluded I don't know
what I'm doing:-)
Any pointers to the best way to do synchronization of
access to the filesystem from external methods?
regards,
Sean McGrath