Skip to main content

Fast hierarchical locks

Project description

= Hierarchical locks

Allows the caller to lock a "directory", or an individual file.

Locks are, by default, shared, recursive & timed.

First optional argument to the lock manager is the "sep".

Second optional argument is "recursive" (default true).

from hilok import HiLok

h = HiLok()     # default sep is '/', can pass it in here

rd = h.read("/some/path")

# nonblocking, this will fail!
try:
    wr = h.write("/some", block=False)
except TimeoutError:
    pass

rd.release()

wr = h.write("/some")

# timeout=0 is the the same as block=False
rd = h.read("/some/path", block=False)

# with syntax is fine:
with h.read("/some/path"):
    pass

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

hilok-0.0.15-cp310-cp310-win_amd64.whl (78.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

hilok-0.0.15-cp310-cp310-macosx_12_0_x86_64.whl (64.8 kB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

hilok-0.0.15-cp39-cp39-win_amd64.whl (78.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

hilok-0.0.15-cp39-cp39-macosx_10_15_x86_64.whl (67.2 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

File details

Details for the file hilok-0.0.15-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: hilok-0.0.15-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 78.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for hilok-0.0.15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ebb340dafb85cf6941b2f9c89fd8ea21bd9385ab2ea3b5f5d73ce945e6fe5875
MD5 898022b54e4b1526768a16d9066c46d2
BLAKE2b-256 c75e0cb2a5e0373677032f824c1b389bc3f060bf3f8970481c1c8093ff3b90eb

See more details on using hashes here.

File details

Details for the file hilok-0.0.15-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for hilok-0.0.15-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 2e0a77e2e6b67234cfcf48345fe15c7b2f37ce1a937b63a7126ef2a56b4bf416
MD5 b0940d246452221469fcc3da0377ce7e
BLAKE2b-256 93115a94441c511c2172129d1dbf5cae8af9dc636428793f2b309a3b38579105

See more details on using hashes here.

File details

Details for the file hilok-0.0.15-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: hilok-0.0.15-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 78.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for hilok-0.0.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6475fc188e5bfd160fb8d4dc6cf5aa1f54d77770aeec0fed888aba1185ee5540
MD5 7fd18f822f7621fd5731a4a48d2b025a
BLAKE2b-256 ff8430eabff9df3db45cd9c7f38360e9dec23e81d2d1e2bee896c8bf7e1b07e4

See more details on using hashes here.

File details

Details for the file hilok-0.0.15-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for hilok-0.0.15-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 33f4815770c227af808684c76a2997113c773b454794e35f509a193c18f594f9
MD5 46e338670f00780a940df92919e6a4e3
BLAKE2b-256 fa4920512fcb37bc0590f8b66bf20d58b976960088cff6b4e88416e3f8f9a5f7

See more details on using hashes here.

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