Mutex Class
In situations where multiple processes or applications are sharing a common resource you will have the problem that you will want only one of them accessing / modifying that source at the time. This is also known as a concurrency problem. A mutex lock solves this problem for you. What it does: it creates a record indicating that for the unique name you passed, a lock has been given. This unique name represents a process or thread or application that can be running multiple times simultaneously. So, during the time it has the lock, no other lock with that name will be given which enforces the exclusivity. The class comes bundles with a storage-adapter class and a mysql-storage class that implements this adapter. But you can easily integrate a self-built storage class that uses another database or even flat-file system.