{ "info": { "author": "Ahmad Alobaid", "author_email": "aalobaid@fi.upm.es", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Topic :: System :: Operating System" ], "description": "Thread Pool for python 2 with multiple parameters. \nPython2 include an undocumented thread pool which \nonly accept functions with single arguments. TPool \nimplements a pool for threads supporting multiple arguments \n\n# Install\n`pip install TPool`\n\n### Why not PPool\nIf you want to have access to shared variables. But also\nnote that in Python (at least the cPython version)\ninclude a global lock that it does not run multiple \nthreads at the same time, but it is good enough if the \nbottle neck is disk IO or network. \n\n## Example\n```\nfrom TPool.TPool import Pool\nfrom threading import Lock\n\npairs = []\n\n\ndef foo_merge(name, num, lock):\n global pairs\n lock.acquire()\n pairs.append((name, num))\n lock.release()\n\n\ndef example():\n global pairs\n pairs = []\n lock = Lock()\n local_pairs = [('A', 2), ('B', 3), ('C', 4), ('D', 5)]\n params = []\n for p in local_pairs:\n param = p + (lock,)\n params.append(param)\n pool = Pool(max_num_of_threads=3, func=foo_merge, params_list=params)\n pool.run()\n print pairs\n\n\nif __name__ == \"__main__\":\n example()\n```\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/oeg-upm/PPool", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "TPool", "package_url": "https://pypi.org/project/TPool/", "platform": "", "project_url": "https://pypi.org/project/TPool/", "project_urls": { "Homepage": "https://github.com/oeg-upm/PPool" }, "release_url": "https://pypi.org/project/TPool/1.2/", "requires_dist": null, "requires_python": "", "summary": "Thread Pool for Python 2", "version": "1.2" }, "last_serial": 5336608, "releases": { "1.2": [ { "comment_text": "", "digests": { "md5": "90f253081fd97bcbeb84645489c9d866", "sha256": "4892f45c0e0d12f690cd4a731eb2190e5781e73a8a7ae7e8717946f6ecb2efda" }, "downloads": -1, "filename": "TPool-1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "90f253081fd97bcbeb84645489c9d866", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7345, "upload_time": "2019-05-30T10:05:35", "url": "https://files.pythonhosted.org/packages/f9/48/6824e34d003dcba6a94ebec0d4f4a2d5d821877c6bcea6288566a2fe333a/TPool-1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3af0e882d794a6e3b846acd7f21568b4", "sha256": "2578f6e33c833bf234aea3009fbe6bc88cecd32504029fcfab9fa9f84d465a84" }, "downloads": -1, "filename": "TPool-1.2.tar.gz", "has_sig": false, "md5_digest": "3af0e882d794a6e3b846acd7f21568b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2746, "upload_time": "2019-05-30T10:05:37", "url": "https://files.pythonhosted.org/packages/37/1a/c1b5bd269854ba0b4d66ce1a61cfa24ed0093e5f1a14e8481509ab77fb4a/TPool-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "90f253081fd97bcbeb84645489c9d866", "sha256": "4892f45c0e0d12f690cd4a731eb2190e5781e73a8a7ae7e8717946f6ecb2efda" }, "downloads": -1, "filename": "TPool-1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "90f253081fd97bcbeb84645489c9d866", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7345, "upload_time": "2019-05-30T10:05:35", "url": "https://files.pythonhosted.org/packages/f9/48/6824e34d003dcba6a94ebec0d4f4a2d5d821877c6bcea6288566a2fe333a/TPool-1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3af0e882d794a6e3b846acd7f21568b4", "sha256": "2578f6e33c833bf234aea3009fbe6bc88cecd32504029fcfab9fa9f84d465a84" }, "downloads": -1, "filename": "TPool-1.2.tar.gz", "has_sig": false, "md5_digest": "3af0e882d794a6e3b846acd7f21568b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2746, "upload_time": "2019-05-30T10:05:37", "url": "https://files.pythonhosted.org/packages/37/1a/c1b5bd269854ba0b4d66ce1a61cfa24ed0093e5f1a14e8481509ab77fb4a/TPool-1.2.tar.gz" } ] }