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.1-cp310-cp310-win_amd64.whl (78.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

hilok-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (84.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

hilok-0.0.1-cp39-cp39-win_amd64.whl (78.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

hilok-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (84.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: hilok-0.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 78.2 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 496df013e0c02c53373059f234b965f084a2c65505807c706c00ec8542b71107
MD5 9962c4be4e8a249a9a488313174d3d16
BLAKE2b-256 fecae1e4f96c0c72bd1449d888356088a63f2180b022443a068a0f6fd34ec07b

See more details on using hashes here.

File details

Details for the file hilok-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hilok-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7a8619f2b4a983b77038cca86e3412cecb5656d0594565cf34d987b206999497
MD5 1f60082c7ca396fdc5bc100ff80389a0
BLAKE2b-256 07ba773dc3023bacc8e7386fec76c44d1b469e14f8c71285677bb11a5a564c74

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hilok-0.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 78.2 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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 29a668d2d7f9c8adc317605627a57b0f8c6f077a9b8b03360ad7dfd1bf5bdac7
MD5 5e2148447caa909a8f3d44fdab592045
BLAKE2b-256 2fee57783bedba6991fdfc4df0ef0047d8084856232a411b23a64bc3a9f6e461

See more details on using hashes here.

File details

Details for the file hilok-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hilok-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 95432ec23481c836e1b7b276d91494a3cca8de0561fd07baad27bdace0d1300f
MD5 a1aadd9cc6dac27d045a1532094f9eb8
BLAKE2b-256 331c8f1f0796bfcec53434a8e5f6d16d5f74a1bcd202e38dedd0b6ecfc44f506

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