Daniel Poelzleithner wrote: > After further investigation, i found out that locking of any kind > doesn't work with apache in prefolk mode, and more or less in the > threaded mode. I haven't found a nice and clean solution yet to do > locking on requests, which worries me a little bit. Locking can be a > important part of apps and I think django should provide a way to have > working locks regardless which server backend is used.
As Ian has pointed you can use file system as a device for locking between separate processes. This is not really something specific to Django. On unix it can look like this: from fcntl import flock, LOCK_EX def lock(): f = open('somefile.lock', 'w') flock(f, LOCK_EX) return f def unlock(f): f.close() On Windows, if I remember correctly, you don't use fcntl but use some exclusive locking options for open(). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---