Skip to main content

Lockfile object with timeouts and context manager

Project description

A LockFile class that implements a context manager with timeouts on top of zc.lockfile, an excellent, cross-platorm implementation of file locking.

Usage

Example usage:

import yg.lockfile
try:
    with yg.lockfile.LockFile('/tmp/lockfile', timeout=900):
            protected_operation()
except yg.lockfile.LockFileTimeout:
    handle_unable_to_lock()

Project details


Download files

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

Source Distribution

yg.lockfile-1.0.zip (5.9 kB view details)

Uploaded Source

File details

Details for the file yg.lockfile-1.0.zip.

File metadata

  • Download URL: yg.lockfile-1.0.zip
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for yg.lockfile-1.0.zip
Algorithm Hash digest
SHA256 0589c1a46ff52d4fe9cf10a2d6c50671552d093e182d8cc4cedf5f5b65ed76c1
MD5 1b8fa0a9b238db95a0353d3e9489f0ad
BLAKE2b-256 74ebbfb410b11ab65a2b213acbf0ecdd2cd643be44ee45d1555acd4179bb820e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page