redis-0.2: A driver for Redis key-value database
Database.Redis.Utils.Lock
Description
Emulating locking primitives
Synopsis
acquireSource
Arguments
The lock's name
Timeout in milliseconds.
Time interval between attempts to lock on
True if lock was acquired
Acquire lock. This function is not reentrant so thread can be locked by itself if it try to acquire the same lock before it was released.
acquire' :: Redis -> String -> Int -> IO BoolSource
acquireOnce :: Redis -> String -> IO BoolSource
release :: Redis -> String -> IO ()Source
acquire with default last parameter set to 50 milliseconds
Try to acquire lock once and return result without any timeout
Release lock. There is no any guarantees that lock was acquired in this thread. Just release this lock and go forth.