{ "info": { "author": "Ted Tibbetts", "author_email": "intuited@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "``CloseableQueue``\n==================\n\nThe ``CloseableQueue`` module includes the ``Closeable*Queue`` classes\nas well as the ``Closed`` exception and some utility functions.\n\nThese classes and functions provide the facility to close a queue\nand to use it as an iterator.\n\n\nThe ``Closeable*Queue`` classes\n-------------------------------\n\nThe ``CloseableQueue`` class adds to ``Queue.Queue``\nthe means to permanently close a queue.\n\nThis is intended to provide queue support for functionality\nthat would otherwise be implemented through the use of sentinel values\nor other mechanisms.\nSuch workarounds can be particularly awkward\nin the case of multi-consumer queues.\n\n``CloseableQueue`` class provides both a ``close`` method\nand an extra parameter, ``last``, to its ``put`` method.\n\n``CloseableLifoQueue`` and ``CloseablePriorityQueue`` are similar classes\nwhich subclass Queue.LifoQueue and Queue.PriorityQueue respectively.\n\nFurther details are available in the docstrings of the classes\nand their methods.\n\n\n``CloseableQueueFactory``\n-------------------------\n\nThis factory function is used to create the ``Closeable*Queue`` classes.\n\nThis approach is used instead of a mixin class\nbecause the Queue module's classes are old-style.\n\nIt should be possible to apply this function to other ``Queue``-derived classes,\nas long as they have not overridden ``get`` or ``put``\n(or defined ``close`` or ``closed``).\n\nFor example:\n\n::\n\n >>> CloseableFooQueue = CloseableQueueFactory(FooQueue,\n ... \"CloseableFooQueue\")\n\n\nThe ``Closed`` exception class\n------------------------------\n\nBoth the ``get`` and ``put`` methods of a CloseableQueue object\nmay raise ``Closed`` if called on a closed queue.\n\nNote that ``get`` will only raise ``Closed`` if the queue is empty.\n\n\nIteration utility functions\n---------------------------\n\nTransformation of iterables to and from queues is made convenient via the\n``enqueue`` and ``dequeue`` functions.\n\nThe ``EnqueueThread`` function provides a further layer of convenience.\n\nAlthough designed to work with closeable queues,\nthese functions can also be meaningfully applied to other Queues.\n\nSee their docstrings for more information.\n\n\nTests\n-----\n\nThe ``CloseableQueue`` test suite is based on, and reuses much of the code from,\nthe test suite for the standard library's Queue module.\n\nRegression tests are performed on the CloseableQueue class,\nin addition to tests of the closing functionality.\n\nAlthough the tests are reasonably thorough,\nthe author is by no means an expert in the area of concurrency;\nreview by more experienced developers is quite welcome.\n\nThe test suite may provide guidance in the form of simplistic usage examples.\n\nSome attempt has been made to write code which will work on older Pythons,\nhowever testing has only been performed on Python 2.6,\nand the author has little experience with older versions.\n\n\nDistribution\n------------\n\n``CloseableQueue`` is available via PyPI, or from the `github repo`_.\n\n.. _github repo: http://github.com/intuited/CloseableQueue\n\n\nLicense\n-------\n\nThe CloseableQueue module is licensed\nunder the permissive terms of the `FreeBSD license`_.\n\nSee the file COPYING for details.\n\n.. _FreeBSD license: http://www.freebsd.org/copyright/freebsd-license.html", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/intuited/CloseableQueue", "keywords": "queue,multithreading,threading,iterator,iterable,iteration", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "CloseableQueue", "package_url": "https://pypi.org/project/CloseableQueue/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/CloseableQueue/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/intuited/CloseableQueue" }, "release_url": "https://pypi.org/project/CloseableQueue/0.9.1.1/", "requires_dist": null, "requires_python": null, "summary": "These classes and functions provide the facility to close a queue and to use it as an iterator.", "version": "0.9.1.1" }, "last_serial": 783957, "releases": { "0.9.1": [ { "comment_text": "", "digests": { "md5": "c0dc7db9b0c463baa7449ec4730bfc83", "sha256": "9157c681710b692a120b666e6834624b96ecc69a0919c4169aed585fbdc6e7d9" }, "downloads": -1, "filename": "CloseableQueue-0.9.1.tar.gz", "has_sig": false, "md5_digest": "c0dc7db9b0c463baa7449ec4730bfc83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21407, "upload_time": "2010-09-26T08:52:37", "url": "https://files.pythonhosted.org/packages/df/ac/6031166704a3fe4834bc2bd2bcb1519c5805c10da3d80e01838c9b66a8bf/CloseableQueue-0.9.1.tar.gz" } ], "0.9.1.1": [ { "comment_text": "", "digests": { "md5": "52b7550f6b50322f8294d49a782cb5b3", "sha256": "19a97f48bb301875251d7050dae6c18d0abad7c516745ff522a383850b32af38" }, "downloads": -1, "filename": "CloseableQueue-0.9.1.1.tar.gz", "has_sig": false, "md5_digest": "52b7550f6b50322f8294d49a782cb5b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21421, "upload_time": "2010-09-26T08:59:53", "url": "https://files.pythonhosted.org/packages/4c/26/ffd44a6499daaee3594015205370a04290b257a53e4e17ed44d8d5e5dd19/CloseableQueue-0.9.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "52b7550f6b50322f8294d49a782cb5b3", "sha256": "19a97f48bb301875251d7050dae6c18d0abad7c516745ff522a383850b32af38" }, "downloads": -1, "filename": "CloseableQueue-0.9.1.1.tar.gz", "has_sig": false, "md5_digest": "52b7550f6b50322f8294d49a782cb5b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21421, "upload_time": "2010-09-26T08:59:53", "url": "https://files.pythonhosted.org/packages/4c/26/ffd44a6499daaee3594015205370a04290b257a53e4e17ed44d8d5e5dd19/CloseableQueue-0.9.1.1.tar.gz" } ] }