I woild like to use database locking mechanisms in order to control access to an external resource (like file system).
What I need is
1. an exclusive (write) lock conflicting with any access to the resource (both for read and write)
2. non-exlusive (read) lock conflicting with writes only
How this could be done?
I'd appreciate any reply.