{"action":"opened","issue":{"url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/555","repository_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby","labels_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/555/labels{/name}","comments_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/555/comments","events_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/555/events","html_url":"https://github.com/ruby-concurrency/concurrent-ruby/issues/555","id":166275740,"number":555,"title":"FileLock","user":{"login":"vemv","id":1162994,"avatar_url":"https://avatars.githubusercontent.com/u/1162994?v=3","gravatar_id":"","url":"https://api.github.com/users/vemv","html_url":"https://github.com/vemv","followers_url":"https://api.github.com/users/vemv/followers","following_url":"https://api.github.com/users/vemv/following{/other_user}","gists_url":"https://api.github.com/users/vemv/gists{/gist_id}","starred_url":"https://api.github.com/users/vemv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vemv/subscriptions","organizations_url":"https://api.github.com/users/vemv/orgs","repos_url":"https://api.github.com/users/vemv/repos","events_url":"https://api.github.com/users/vemv/events{/privacy}","received_events_url":"https://api.github.com/users/vemv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-19T08:32:05Z","updated_at":"2016-07-19T08:32:05Z","closed_at":null,"body":"Hi!\r\n\r\nI think I have the need for a File-based lock, because multiple web processes (as typical in Puma/Unicorn) can attempt to perform an overlapping operation. It only overlaps within a given machine - not across the fleet (so a distributed lock isn't the answer in this case).\r\n\r\nI see a couple gems providing locks, one of them looking pretty well-maintained.\r\n\r\nI'm still hesitant to use any of those though - File-based locking is apparently a difficult technique and I'd expect its implementation/testing to be of the highest quality - today and tomorrow.\r\n\r\nconcurrent-ruby is a popular/reputed project which probably can give that degree of confidence.\r\n\r\nWould you be willing to offer a File-based locking mechanism? Is there any technical concern?\r\n\r\n## API\r\n\r\nPersonally I'd expect the API to be as simple as possible, and as similar as possible to a Mutex. I shouldn't know anything about unixy things to use it, nor there should be low-level flags, etc.\r\n\r\nCapablities would include:\r\n\r\n* lock\r\n* unlock\r\n* try-lock\r\n\r\nI don't know if something akin to a ReadWriteLock should be provided. Personally I don't have that use case.\r\n\r\nWhat do you think?\r\n\r\nCheers - Victor"}}
{"actor":{"display_login":"vemv"}}