Skip to main content

No project description provided

Project description

RwLock: Reader-Writer lock

Release Note

  1. V1.2:
    1. fix version convert issue in setup.py
  2. V1.1:
    1. Reduce test time
    2. Refactoring
  3. V1.0: first release

Introduction

We can simply protect a shared resource by a lock. But the performance is not good because each reader should run one-by-one.

A Reader-Writer lock can improve the performance by let readers running simultaneously.

By the way, a writer should wait until all readers done. In a frequently read situation, a new reader after the writer can also increase the read count, let read count never decrease to 0. This will starve writer.

RwLock:

  1. Let readers running simultaneously.
  2. Exclude "multiple readers" and each writer.
  3. provide a flag "write_first" to prevent starve writer.

Install

  1. pip install cy_rwlock
  2. download latest from https://pypi.org/project/cy_rwlock/#files

Unittest

  • run scripts\run.bat

Deploy

  • run scripts\deploy.bat

TODO

  • autogen pypi project description

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

cy_rwlock-1.2.post5.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file cy_rwlock-1.2.post5.tar.gz.

File metadata

  • Download URL: cy_rwlock-1.2.post5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for cy_rwlock-1.2.post5.tar.gz
Algorithm Hash digest
SHA256 cd3ec40f95821d8316e3615e4b9443e5bbc998655921c9226653206ef1db2688
MD5 30a2cc40df7ac65884857b66d9d85c34
BLAKE2b-256 3507bdb99dc9e2765fda693a1f19a38674f3af79a15fbdd732fc1b3a428938d7

See more details on using hashes here.

Supported by

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