Skip to content

Instantly share code, notes, and snippets.

@nickyleach
nickyleach / Lock.php
Created September 10, 2012 22:54
Simple redis-backed Mutex
<?
class Lock {
const TIMEOUT = 20;
const SLEEP = 100000;
/**
* Stores the expire time of the currently held lock
* @var int