Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

tdrhq/file-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tdrhq

file-lock: Simple flock based file locking for CL

There's not much to this. Currently only supported on POSIX systems (so no Windows, though I'll be happy get a PR for that.)

Only supported on SBCL and Lispworks.

On any other CL and OS combination, we revert to a noop lock (i.e. we won't throw an error, so beware).

This uses a polling mechanism. (i.e., it doesn't block on flock. Instead, it keeps polling flock in a non-blocking manner. Otherwise the CL thread would be uninterruptable which isn't a great developer experience.)

The most common use case is pretty straightforward:

(with-file-lock (:file "...")
  (do-stuff))

Author

Arnold Noronha arnold@screenshotbot.io

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published