module
Lune::SingleInstance
Defined in:
lune/single_instance.crClass Method Summary
-
.acquire(app_slug : String, dir : String = File.join(Path.home, ".lune")) : File | Nil
Tries to acquire an exclusive non-blocking flock on the lock file.
-
.slug(title : String) : String
Converts an app title into a safe filename slug.
Class Method Detail
Tries to acquire an exclusive non-blocking flock on the lock file. Returns the open File (which must stay open to hold the lock) or nil if another process already holds it.