Skip to content

Use process lock to see if a process is already running or designate a master process when running concurrent applications.

Notifications You must be signed in to change notification settings

simon-engledew/ruby-process-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A set of simple multiprocess concurrency examples originally designed to allow many worker processes to self organise and identify a leader process.

Example:

IRB 1>>
pid = PidFile.new('example.tmp')
pid.acquire!
=> true
File.read('example.tmp')
=> "2435"

IRB 2>>
pid = PidFile.new('example.tmp')
pid.acquire!
=> false
File.read('example.tmp')
=> "2435"

If you are looking for the process_lock gem, go here: https://github.com/ianheggie/ruby-process-lock/

Copyright (c) 2008-2014 Simon Engledew, released under the MIT license

About

Use process lock to see if a process is already running or designate a master process when running concurrent applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages