{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "===============================\ntxrwlock\n===============================\n.. image:: https://travis-ci.org/Stibbons/txrwlock.svg?branch=master\n :target: https://travis-ci.org/Stibbons/txrwlock\n.. image:: https://ci.appveyor.com/api/projects/status/gsnw64oow1mlf72e?svg=true\n :target: https://ci.appveyor.com/project/Stibbons/txrwlock\n.. image:: https://readthedocs.org/projects/txrwlock/badge/?version=latest\n :target: http://txrwlock.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. image:: https://coveralls.io/repos/github/Stibbons/txrwlock/badge.svg\n :target: https://coveralls.io/github/Stibbons/txrwlock\n.. image:: https://badge.fury.io/py/txrwlock.svg\n :target: https://pypi.python.org/pypi/txrwlock/\n :alt: Pypi package\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n :target: ./LICENSE\n :alt: MIT licensed\n\nReaders/Writer Lock for Twisted\n\n- Free software: MIT\n- Documentation: http://txrwlock.readthedocs.io/en/latest/\n- Source: https://github.com/Stibbons/txrwlock\n- Presentation: http://www.great-a-blog.co/readerswriter-lock-for-twisted/\n\nFeatures\n--------\n\nTwisted implementation of a `Readers/Writer Lock\n`_. This synchronization primitive allows to lock\na share depending on two access roles: \"reader\" which only access to the data without modifying it,\nand \"writer\" which may want to change the data in the share.\n\n- Multiple readers can access to the data at the same time. There is no locking at all when only\n readers require access to the share\n- When a write requires access to the share, it prevents any new reader request to fullfil and put\n these requests into a waiting queue. It will wait for all ongoing reads to finish\n- Only one writer can act at the same time\n- This Lock is well suited for share with more readers than writer. Write requests must be at least\n an order of magnitude less often that read requests\n\nThis implementation brings this mechanism to the Twisted's deferred. Please note they are\nindependent with other multithreading RW lock.\n\nFor example, a data structure is shared by a different deferreds, triggered on different contexts.\nObviously, only one deferred can be writing to the data structure at a time. If more than one was\nwriting, then they could potentially overwrite each other's data. To prevent this from happening,\nthe writing deferred obtain a \"writer\" lock in an exclusive manner, meaning that it and only it has\naccess to the data structure. Note that the exclusivity of the access is controlled strictly by\nvoluntary means. The opposite occurs with readers; since reading a data area is a non-destructive\noperation, any number of concurent deferred can be reading the data.\n\nHowever, you should protect all parts that will read data in a coherence way. For example, the\nreading deferred may be confused by reading a part of the data, getting preempted by a writing\ndeferred, and then, when the reading deferred \"resumes\", continue reading data, but from a newer\n\"update\" of the data. A data inconsistency would then result.\n\nHeavily inspirated `by this example `_.\n\nUsage\n-----\n\nAn Inlinecallbacks deferred that needs \"read\" access to a share use the following pattern:\n\n.. code-block:: python\n\n from twisted.internet import defer\n from txrwlock import TxReadersWriterLock\n\n ...\n\n class MySharedObject(object):\n\n def __init__(self):\n self._readWriteLock = TxReadersWriterLock()\n\n @defer.inlineCallbacks\n def aReaderMethod(...):\n try:\n yield rwlocker.readerAcquire()\n # ... any treatment ...\n finally:\n yield rwlocker.readerRelease()\n\nAn Inlinecallbacks deferred that needs \"write\" access to a share uses the following pattern:\n\n.. code-block:: python\n\n @defer.inlineCallbacks\n def aWriterMethod(...):\n try:\n yield rwlocker.writerAcquire()\n # ... any treatment ...\n finally:\n yield rwlocker.writerRelease()\n\nDevelopment\n-----------\n\nPlease note the following magical feature of this repository:\n\n- This package use PBR to compute automatically the version number, generate `ChangeLog` and\n `AUTHORS`.\n- Deployment to Pypi is automatically made by Travis on successful tag build. Dependencies declared\n on\n- `requirements.txt` declares the strict minimum of dependencies for external modules that want to\n use `txrwlock`. These dependencies are not version frozen.\n- For development, unit test, style checks, you **need** to install `requirements-dev.txt` as well.\n- Travis validates txrwlock on Linux and AppVeyor on Windows\n\nSetup for development and unit tests\n\n.. code-block:: bash\n\n $ make dev\n\nBuild source package, binary package and wheel:\n\n.. code-block:: bash\n\n make dists\n\nThese builds automatically generate `ChangeLog` and `AUTHOR` files from the git commit history,\nthanks PBR.\n\nExecute unit test:\n\n.. code-block:: bash\n\n make test\n\nExecute coverage:\n\n.. code-block:: bash\n\n make coverage", "description_content_type": null, "docs_url": "https://pythonhosted.org/txrwlock/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "txrwlock", "package_url": "https://pypi.org/project/txrwlock/", "platform": "", "project_url": "https://pypi.org/project/txrwlock/", "project_urls": null, "release_url": "https://pypi.org/project/txrwlock/1.1.4/", "requires_dist": null, "requires_python": "", "summary": "Readers/Writer Lock for Twisted", "version": "1.1.4" }, "last_serial": 3276138, "releases": { "0.0.1.dev7": [ { "comment_text": "", "digests": { "md5": "6d6ae230094932699cebc88d5ecb6059", "sha256": "4bc35ece85c502f96d3b442d921de4009656a56a0d89e5c661f17324eee1f63a" }, "downloads": -1, "filename": "txrwlock-0.0.1.dev7.tar.gz", "has_sig": false, "md5_digest": "6d6ae230094932699cebc88d5ecb6059", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6374, "upload_time": "2016-09-27T23:12:16", "url": "https://files.pythonhosted.org/packages/d2/eb/16223c6091b64da6e5a502f9d7cbd55e2c1fb8f4b31f7e96594bbf12cd11/txrwlock-0.0.1.dev7.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "1da15b28a192a6f3c47a48a095ecbf17", "sha256": "570826f8af6b996d3ba527e46eac7b9cc9a61970aad668e920d7686c932dd89f" }, "downloads": -1, "filename": "txrwlock-0.4.2.tar.gz", "has_sig": false, "md5_digest": "1da15b28a192a6f3c47a48a095ecbf17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17101, "upload_time": "2016-09-28T12:05:38", "url": "https://files.pythonhosted.org/packages/cf/b3/5ce2d92f83fa1145f5d8d9ebc513a0b255f5909192af2f067b9e6a9fe5e9/txrwlock-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "dbb6be2e5719afe507ca041771940dcf", "sha256": "c2a362ce6bbe279130bbc3dc04596e9f0169c4e381549c9b49d4dfda1a78b817" }, "downloads": -1, "filename": "txrwlock-0.4.3.tar.gz", "has_sig": false, "md5_digest": "dbb6be2e5719afe507ca041771940dcf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17841, "upload_time": "2016-09-28T13:34:26", "url": "https://files.pythonhosted.org/packages/bb/5b/40fbe7aa25397e3b99499308142fdf1c39fea44bb2a028fddcd840783a6a/txrwlock-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "c97be64b35a9a7ac3288c3537f4c9423", "sha256": "c6fb755d6d92e54119f61ece0461e93851359a8b44538d91ca09e3ecf7e3dda0" }, "downloads": -1, "filename": "txrwlock-0.4.4.tar.gz", "has_sig": false, "md5_digest": "c97be64b35a9a7ac3288c3537f4c9423", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17664, "upload_time": "2016-09-28T14:07:27", "url": "https://files.pythonhosted.org/packages/52/c6/7080e9357314aa3b9cf2533040133b49e84d319b1533747b29af7cda492a/txrwlock-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "bbe962785cc1d97dae714b07411dbf7c", "sha256": "6be2321a36287d295c7b766be0f9a59643bb21e3430df5bc614531c49aeb52cd" }, "downloads": -1, "filename": "txrwlock-0.4.5.tar.gz", "has_sig": false, "md5_digest": "bbe962785cc1d97dae714b07411dbf7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17959, "upload_time": "2016-09-28T14:38:54", "url": "https://files.pythonhosted.org/packages/d6/b4/2375af53d11aaa0d319774c837d6b968d12a9bb4e56dff973533a2b90887/txrwlock-0.4.5.tar.gz" } ], "0.4.6": [ { "comment_text": "", "digests": { "md5": "5c76ee88962f0b59e1776601af4517fe", "sha256": "4bd00a4434a48a4b2ab4190343cfac434cf9a8960cf9c43e4dd033e6351ca1d2" }, "downloads": -1, "filename": "txrwlock-0.4.6.tar.gz", "has_sig": false, "md5_digest": "5c76ee88962f0b59e1776601af4517fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18591, "upload_time": "2016-09-28T20:31:45", "url": "https://files.pythonhosted.org/packages/37/98/c433587d18636cba04e9eefe2a42533b1cfe3aa9732806739efd2ac8a803/txrwlock-0.4.6.tar.gz" } ], "0.4.7": [ { "comment_text": "", "digests": { "md5": "73bd3ba41f7e1f39116b36a54ce6e01e", "sha256": "e77412614b76c1cc5eb20c816263763c3c720ec6f44e8b490b303b2b4a208fd7" }, "downloads": -1, "filename": "txrwlock-0.4.7.tar.gz", "has_sig": false, "md5_digest": "73bd3ba41f7e1f39116b36a54ce6e01e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18658, "upload_time": "2016-09-28T21:35:50", "url": "https://files.pythonhosted.org/packages/70/5c/3b697b103b439c317000200f8413dba5f464eb023b6d551b70aaa613dd2e/txrwlock-0.4.7.tar.gz" } ], "0.4.8": [ { "comment_text": "", "digests": { "md5": "21c1c6300ed065fabd62596221e77123", "sha256": "662c7baecd34d40142c4843394ba94d6ec6798a6dd4cbf680c743ea9ed1a2199" }, "downloads": -1, "filename": "txrwlock-0.4.8.tar.gz", "has_sig": false, "md5_digest": "21c1c6300ed065fabd62596221e77123", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25051, "upload_time": "2016-10-01T09:13:07", "url": "https://files.pythonhosted.org/packages/22/41/e714bc62c1a83d4a7039d593f2fd6057c644494902f2162800e019d9ae6e/txrwlock-0.4.8.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "e69aab8d1e43b49aa68eaad87ba988f5", "sha256": "81c0dc99d98ed8f0362f18a664e63378ffc1dfb5391b1ec8cc3071e916efc1bf" }, "downloads": -1, "filename": "txrwlock-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e69aab8d1e43b49aa68eaad87ba988f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25718, "upload_time": "2017-10-21T16:54:51", "url": "https://files.pythonhosted.org/packages/46/c6/86d97ad4efdea067a44bc1e5112da98b390d8e099444c53d62324679754a/txrwlock-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "b823da087dc848d8618da98be3f607ac", "sha256": "db6f9a33dc7a1c982aec67383ccba3d5e00daa7409e5ad32784375bd76437c66" }, "downloads": -1, "filename": "txrwlock-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b823da087dc848d8618da98be3f607ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25376, "upload_time": "2017-10-23T16:44:25", "url": "https://files.pythonhosted.org/packages/2f/87/ee28f5d0aa698a6fb41d57c1b35111397750482c19636289d92d07224f0b/txrwlock-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "4624715eb551c827f7703054ec259a67", "sha256": "8f0ed657fcb8e5c3f9f6e817a9c5993b482ec981a8aa1c5d0037ba15b727b942" }, "downloads": -1, "filename": "txrwlock-1.1.1.tar.gz", "has_sig": false, "md5_digest": "4624715eb551c827f7703054ec259a67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25390, "upload_time": "2017-10-23T20:18:12", "url": "https://files.pythonhosted.org/packages/53/82/5fe0090a04b2a703f947bba44da4884bffeefe61d17368bbbbcf3ca941d5/txrwlock-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "378cc01c467dff716c7a79311b2f98c5", "sha256": "4cddb5a9cd2fb5b22fa6d80ed3f4e2c60ac18eeb72ea3eab8d8ae3532636e96e" }, "downloads": -1, "filename": "txrwlock-1.1.2.tar.gz", "has_sig": false, "md5_digest": "378cc01c467dff716c7a79311b2f98c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25395, "upload_time": "2017-10-23T21:57:15", "url": "https://files.pythonhosted.org/packages/05/e2/88d2871e2da0be9d72b32de40d86310859df68091982cb9b86154db00d3f/txrwlock-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "31dfc3df213eaa924620bcf335aeee77", "sha256": "f837ba3f3337c940a333455ec0efc9565fe17138787c8c03eb19383dbe4a5630" }, "downloads": -1, "filename": "txrwlock-1.1.3.tar.gz", "has_sig": false, "md5_digest": "31dfc3df213eaa924620bcf335aeee77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25382, "upload_time": "2017-10-24T20:07:59", "url": "https://files.pythonhosted.org/packages/95/4d/242fa317e1979fd98c86c9516761740d97d98d98c4f11a187af8e3fe2fa7/txrwlock-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "383542c852bbe62d674131a376db6baf", "sha256": "7d7923689014ed39f0663a6f33944166e34b044bcf288c0b6029f6642fe070b1" }, "downloads": -1, "filename": "txrwlock-1.1.4.tar.gz", "has_sig": false, "md5_digest": "383542c852bbe62d674131a376db6baf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25429, "upload_time": "2017-10-24T20:24:32", "url": "https://files.pythonhosted.org/packages/1d/7e/85bf379a1c4241b9837b9e1b9ef7e73ed008bca26dc328590dbb532a7d2c/txrwlock-1.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "383542c852bbe62d674131a376db6baf", "sha256": "7d7923689014ed39f0663a6f33944166e34b044bcf288c0b6029f6642fe070b1" }, "downloads": -1, "filename": "txrwlock-1.1.4.tar.gz", "has_sig": false, "md5_digest": "383542c852bbe62d674131a376db6baf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25429, "upload_time": "2017-10-24T20:24:32", "url": "https://files.pythonhosted.org/packages/1d/7e/85bf379a1c4241b9837b9e1b9ef7e73ed008bca26dc328590dbb532a7d2c/txrwlock-1.1.4.tar.gz" } ] }