Sha256: c74f1e7c0b03f0874b3321cfe59557a5e0fcba9e0fdd59d6a30cbb8b0079fb18

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

# FlockMutex

A very simple ruby mutex class using file lock.

## Usage

```ruby
require "flock_mutex"

mutex = FlockMutex.new("/tmp/test.lock")
mutex.lock
mutex.unlock
mutex.locked?
mutex.synchronize {
  #...
}
```

## Examples

```ruby
# my_app.rb

mutex = FlockMutex.new("/tmp/my_app.lock")

if mutex.locked?
  puts "Already running"
  exit false
end
```

## Install

    gem install flock_mutex

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flock_mutex-1.0 README.md