Skip to main content

Python module for an atomic named lock which is local to the machine.

Project description

Python module for an atomic named-lock which is local to the machine.

NamedAtomicLock works by taking advantage of the fact that POSIX defines mkdir to be an atomic operation. So a directory is used as the name.

All UNIX systems are supported, overhead is light, and the lock is global to the system.

The NamedAtomicLock module provides a class NamedAtomicLock which implements the “lock” interface, with familiar “acquire” and “release” methods.


A basic usage example

from NamedAtomicLock import NamedAtomicLock

myLock = NamedAtomicLock(‘myLock’)

if myLock.acquire(timeout=15):



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for NamedAtomicLock, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size NamedAtomicLock-1.1.0.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page