{ "info": { "author": "Edward Beech", "author_email": "initialed85@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "# CollapsingThreadPoolExecutor\n\nThe CollapsingThreadPoolExecutor is inspired by and compatible with the ThreadPoolExecutor from the\n\"futures\" module, it operates differently in that worker threads are handled with a stack which results in the same worker or workers doing all the work (and idle workers being destroyed).\n\n## How to install\n\n $ pip install collapsing-thread-pool-executor\n\n## How to develop\n\n**Prerequisites**\n\n* python3 w/ pip\n* python2 w/ pip\n* virtualenvwrapper\n* entr\n\n**Set up the environments**\n\n $ mkvirtualenv -p `which python2.7` collapsing-thread-pool-executor-py2\n $ pip install .\n $ pip install -r requirements.txt\n\n $ mkvirtualenv -p `which python3` collapsing-thread-pool-executor-py3\n $ pip install .\n $ pip install -r requirements.txt\n\n**Watch the tests**\n\n # watch python2 tests in one window\n $ workon collapsing-thread-pool-executor-py2\n $ find ./ -name '*.py' | entr -c py.test -v --log-level=DEBUG collapsing_thread_pool_executor\n\n # watch python3 tests in one window\n $ workon collapsing-thread-pool-executor-py3\n $ find ./ -name '*.py' | entr -c py.test -v --log-level=DEBUG collapsing_thread_pool_executor\n\n## Examples\n\nThe example below will execute `some_task()` 100 times; as `some_task()` should take a second to execute and as we've allocated 10 workers, the whole thing should take about 10 seconds.\n\n import time\n\n from collapsing_thread_pool_executor import CollapsingThreadPoolExecutor\n\n def some_task():\n time.sleep(1)\n\n # all arguments are optional\n pool = CollapsingThreadPoolExecutor(\n workers=10,\n thread_name_prefix='SomePool',\n permitted_thread_age_in_seconds=60,\n )\n\n for i in range(0, 100):\n pool.submit(some_task)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/initialed85/collapsing-thread-pool-executor", "keywords": "sample setuptools development", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "collapsing-thread-pool-executor", "package_url": "https://pypi.org/project/collapsing-thread-pool-executor/", "platform": "", "project_url": "https://pypi.org/project/collapsing-thread-pool-executor/", "project_urls": { "Homepage": "https://github.com/initialed85/collapsing-thread-pool-executor" }, "release_url": "https://pypi.org/project/collapsing-thread-pool-executor/2019.10/", "requires_dist": [ "futures (<4.0.0,>=3.2.0)", "check-manifest ; extra == 'dev'", "coverage ; extra == 'test'" ], "requires_python": "", "summary": "A thread pool that auto-manages the number of worker threads and is compatible with the \"futures\" module ThreadPoolExecutor interface.", "version": "2019.10" }, "last_serial": 5921400, "releases": { "2018.1": [ { "comment_text": "", "digests": { "md5": "974ef99d663b37884ecbe4dc66d18f66", "sha256": "243c9e20364dd3655787a1ee3c62ebb7863c37e0274dd8bdafa964e9f87f8d25" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2018.1-py3-none-any.whl", "has_sig": false, "md5_digest": "974ef99d663b37884ecbe4dc66d18f66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8738, "upload_time": "2018-03-16T10:20:37", "url": "https://files.pythonhosted.org/packages/f9/d4/4e4f9ffb8008c2be3ae425b90167ab25c988f4082886a60e9d5e9b650c65/collapsing_thread_pool_executor-2018.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ffa9487d18e0416e827ffab4b4163245", "sha256": "34f99ba97c6b71ce196289b841871d9c6e3efd428f05136baa42ccb79a6e2040" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2018.1.tar.gz", "has_sig": false, "md5_digest": "ffa9487d18e0416e827ffab4b4163245", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6269, "upload_time": "2018-03-16T10:20:39", "url": "https://files.pythonhosted.org/packages/2e/73/fab3b6e06529ffb3633f719c4d4851b6592e21a60b801f5fc798dcfee4f3/collapsing-thread-pool-executor-2018.1.tar.gz" } ], "2018.2": [ { "comment_text": "", "digests": { "md5": "12156966e10a6210a12efe7bd12ecbf6", "sha256": "bbb6546438982e385071481494750448bd7b8dbadd47d3013cd781c17133c175" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2018.2-py3-none-any.whl", "has_sig": false, "md5_digest": "12156966e10a6210a12efe7bd12ecbf6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8752, "upload_time": "2018-03-16T10:27:08", "url": "https://files.pythonhosted.org/packages/1a/6d/f22a6fadee10a8cdd2ebdd77f2750b6f028c3be4a0b2b8462beac8f88362/collapsing_thread_pool_executor-2018.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84077a3f0ad3a30177f3c808d1db436b", "sha256": "43716998d40c56fde45b725924d491f26fa27359b2567a88a28883ffb687ca1f" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2018.2.tar.gz", "has_sig": false, "md5_digest": "84077a3f0ad3a30177f3c808d1db436b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6283, "upload_time": "2018-03-16T10:27:10", "url": "https://files.pythonhosted.org/packages/3c/21/c22af8577713f3b7477b63552002db33c655f54b7821adf0a093bd90f4df/collapsing-thread-pool-executor-2018.2.tar.gz" } ], "2018.3": [ { "comment_text": "", "digests": { "md5": "e87e4acb8d11f0057ec187454a2e1350", "sha256": "57b6ea9e179552c7fc618718631fe8f43441d7b929abbe44422348b1dec23ee1" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2018.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e87e4acb8d11f0057ec187454a2e1350", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8750, "upload_time": "2018-03-16T10:28:28", "url": "https://files.pythonhosted.org/packages/47/64/fdaeff0dd805ba753d4f10345bf8a2c889b9971a1a200ec8b5cc69d67f6b/collapsing_thread_pool_executor-2018.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dc4a29feba1aa8273b1ac9491c4b654b", "sha256": "d0e1adce9116eab1229844cb459bc6a421649290dda31fdfb67bae899eda0f5a" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2018.3.tar.gz", "has_sig": false, "md5_digest": "dc4a29feba1aa8273b1ac9491c4b654b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6281, "upload_time": "2018-03-16T10:28:29", "url": "https://files.pythonhosted.org/packages/84/eb/2944e2d902d6dbd1a9216e51c9d41241ce74842fbf5053e1f403386e1fe4/collapsing-thread-pool-executor-2018.3.tar.gz" } ], "2018.4": [ { "comment_text": "", "digests": { "md5": "8a665d3bb283e7bc164ff3898864d899", "sha256": "8edd559c5f3c433f593b5f179fce1a39da25273fbd04f1100a43ce6afe168381" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2018.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8a665d3bb283e7bc164ff3898864d899", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8799, "upload_time": "2018-03-16T11:00:59", "url": "https://files.pythonhosted.org/packages/f2/e2/886fe27ad887b1105e5d7024bf56528447a2a43efe42c0ad0994e2c92e04/collapsing_thread_pool_executor-2018.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e44de4534a4fbcc78ba32a9be52083f2", "sha256": "a266659e273b734b2f2c12f36effe6942841f1b70b25996d9e83c9e752a230ad" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2018.4.tar.gz", "has_sig": false, "md5_digest": "e44de4534a4fbcc78ba32a9be52083f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6292, "upload_time": "2018-03-16T11:01:01", "url": "https://files.pythonhosted.org/packages/4e/45/eb0b0a9c3db7c23e4945fd4eedc0aa45d9df7c23cbd05d8b240786e84de2/collapsing-thread-pool-executor-2018.4.tar.gz" } ], "2018.5": [ { "comment_text": "", "digests": { "md5": "ef0ef01114e9d72db8f2dadd6151cb57", "sha256": "dc4b8b1ab6b6416d4666156f60cd680534572e09c6958825b99543e96691bd42" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2018.5-py3-none-any.whl", "has_sig": false, "md5_digest": "ef0ef01114e9d72db8f2dadd6151cb57", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8782, "upload_time": "2018-03-16T11:02:23", "url": "https://files.pythonhosted.org/packages/d3/98/c1456d60494b236456ed5bb9df42441ee4804c732e5e9f0e28ecc81c1841/collapsing_thread_pool_executor-2018.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ab70b9dec79f24edbe31ba25a0ccab3", "sha256": "e53440298dda071e116319666145917212a28ad9bb305ee38925dd3baf1e3aed" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2018.5.tar.gz", "has_sig": false, "md5_digest": "6ab70b9dec79f24edbe31ba25a0ccab3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6284, "upload_time": "2018-03-16T11:02:25", "url": "https://files.pythonhosted.org/packages/7f/e5/2b996074c8e3eab865f0bac3d8e9ad2088a3ec5650535783a001bce511ce/collapsing-thread-pool-executor-2018.5.tar.gz" } ], "2018.6": [ { "comment_text": "", "digests": { "md5": "1532bc57a6cfbf53ed9051898a189edb", "sha256": "ddc996e762e6600443c0ba847a8a0d70791fdc647f0cb25fe0ecb8c7420da1f6" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2018.6-py3-none-any.whl", "has_sig": false, "md5_digest": "1532bc57a6cfbf53ed9051898a189edb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8799, "upload_time": "2018-03-17T11:31:16", "url": "https://files.pythonhosted.org/packages/aa/2d/b25036fac734f699279105d7c6445baaf3b0f501f84c08afbc5931868941/collapsing_thread_pool_executor-2018.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1572225f0573c8a65bd3672b67c3017b", "sha256": "1abcfe023e5ba5a5a46f2f6e693d24d5fc34a49271480e18f37338e72ee97f73" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2018.6.tar.gz", "has_sig": false, "md5_digest": "1572225f0573c8a65bd3672b67c3017b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6313, "upload_time": "2018-03-17T11:31:18", "url": "https://files.pythonhosted.org/packages/53/2c/617bd9e1b670b873ca0a1a88c636fdeae322f67981cbffa08ade20540e07/collapsing-thread-pool-executor-2018.6.tar.gz" } ], "2019.10": [ { "comment_text": "", "digests": { "md5": "9fce439041fc44c3f154840d74fac4f9", "sha256": "c0452b7491bea45d91dcc5534742148479931b9bd3695fae29b0eb9228ffe6e9" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2019.10-py2-none-any.whl", "has_sig": false, "md5_digest": "9fce439041fc44c3f154840d74fac4f9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7961, "upload_time": "2019-10-03T02:33:02", "url": "https://files.pythonhosted.org/packages/db/e5/ab3f932bb631e50fe4f4688d79fd217b9db6eb107092bb747e6059977791/collapsing_thread_pool_executor-2019.10-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb812de88fe21767508870d7139dadff", "sha256": "02a3087372067f3fa6dd26b49239ed45f088fd57edfb1e4abb8d35385d12451e" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2019.10.tar.gz", "has_sig": false, "md5_digest": "bb812de88fe21767508870d7139dadff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6355, "upload_time": "2019-10-03T02:33:03", "url": "https://files.pythonhosted.org/packages/1c/2a/93f3b44ceb5408e0fed1b476973266a51cdab6ad54ebc113403b50f74531/collapsing-thread-pool-executor-2019.10.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9fce439041fc44c3f154840d74fac4f9", "sha256": "c0452b7491bea45d91dcc5534742148479931b9bd3695fae29b0eb9228ffe6e9" }, "downloads": -1, "filename": "collapsing_thread_pool_executor-2019.10-py2-none-any.whl", "has_sig": false, "md5_digest": "9fce439041fc44c3f154840d74fac4f9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7961, "upload_time": "2019-10-03T02:33:02", "url": "https://files.pythonhosted.org/packages/db/e5/ab3f932bb631e50fe4f4688d79fd217b9db6eb107092bb747e6059977791/collapsing_thread_pool_executor-2019.10-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb812de88fe21767508870d7139dadff", "sha256": "02a3087372067f3fa6dd26b49239ed45f088fd57edfb1e4abb8d35385d12451e" }, "downloads": -1, "filename": "collapsing-thread-pool-executor-2019.10.tar.gz", "has_sig": false, "md5_digest": "bb812de88fe21767508870d7139dadff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6355, "upload_time": "2019-10-03T02:33:03", "url": "https://files.pythonhosted.org/packages/1c/2a/93f3b44ceb5408e0fed1b476973266a51cdab6ad54ebc113403b50f74531/collapsing-thread-pool-executor-2019.10.tar.gz" } ] }