{ "info": { "author": "vilame", "author_email": "opaquism@hotmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent" ], "description": "\nYou can implement thread pools by adding a single line of code without changing the order of any previous code.\n===============================================================================================================\n\n.. code-block:: python\n\n import vthread\n \n @vthread.pool(3) # just use this line to make pool, Create a threadpool with three threads\n def crawl(i):\n import time;time.sleep(1) # Simulation time consuming\n print(\"crawl_url:\",i)\n \n urls = [\"http://url1\",\n \"http://url2\",\n \"http://url3\",\n \"http://url4\"]\n \n for u in urls:\n crawl(u) # This function becomes a function that adds the original function to the thread pool.\n\n\nIt provides a method for grouping the thread pool\n=================================================\n\n.. code-block:: python\n\n import vthread\n pool_1 = vthread.pool(5,gqueue=1) # open a threadpool with 5 threads named 1\n pool_2 = vthread.pool(2,gqueue=2) # open a threadpool with 2 threads named 2\n \n @pool_1\n def foolfunc1(num):\n time.sleep(1)\n print(f\"foolstring1, test3 foolnumb1:{num}\")\n \n @pool_2 \n def foolfunc2(num):\n time.sleep(1)\n print(f\"foolstring2, test3 foolnumb2:{num}\")\n\n @pool_2 \n def foolfunc3(num):\n time.sleep(1)\n print(f\"foolstring3, test3 foolnumb3:{num}\")\n \n for i in range(10): foolfunc1(i)\n for i in range(4): foolfunc2(i) \n for i in range(2): foolfunc3(i)\n # default gqueue is 0\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cilame/vthread", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "vthread", "package_url": "https://pypi.org/project/vthread/", "platform": "", "project_url": "https://pypi.org/project/vthread/", "project_urls": { "Homepage": "https://github.com/cilame/vthread" }, "release_url": "https://pypi.org/project/vthread/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "the best threadpool pack.", "version": "0.1.1" }, "last_serial": 4136489, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b4e5620343b056a190e59ab79c077f4a", "sha256": "ed0658fde7a2fbdd45c73838c3ba686bd4a5c4ed5ed1b61da908771b8bad956c" }, "downloads": -1, "filename": "vthread-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b4e5620343b056a190e59ab79c077f4a", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6016, "upload_time": "2018-07-11T13:04:18", "url": "https://files.pythonhosted.org/packages/9e/93/2f3be4f66188011c64326d992deb0723523030f9d583857faf014deb7e94/vthread-0.0.1-py3-none-any.whl" } ], "0.0.12": [ { "comment_text": "", "digests": { "md5": "22025c4386f69473e63eae2f7c4b7d7a", "sha256": "d3fc792e65473dd6131626b109e1323449423c187c1d5b58338433233bf88375" }, "downloads": -1, "filename": "vthread-0.0.12-py3-none-any.whl", "has_sig": false, "md5_digest": "22025c4386f69473e63eae2f7c4b7d7a", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 8929, "upload_time": "2018-07-16T10:46:08", "url": "https://files.pythonhosted.org/packages/62/cb/9d3d3c8c8848e68d309bb8cbea83dc06f0a433c6068e74dc2161f12b8364/vthread-0.0.12-py3-none-any.whl" } ], "0.0.13": [ { "comment_text": "", "digests": { "md5": "4b3d2818c1d936319c98a528aaf474e2", "sha256": "fda6ba8ff0aede05ebca9e1c353a69b5fd9a5bb54384fd8e13dc1bb8a1295d91" }, "downloads": -1, "filename": "vthread-0.0.13-py3-none-any.whl", "has_sig": false, "md5_digest": "4b3d2818c1d936319c98a528aaf474e2", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9111, "upload_time": "2018-07-17T04:06:09", "url": "https://files.pythonhosted.org/packages/3e/70/a8e8172aa5f782abc83b59cf9c8d81d68698dcc5527b2a0f419ae4f232d3/vthread-0.0.13-py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "5979aacaccd2d0613d7b046f34c2ef17", "sha256": "29de81d66a5961e2792ab5257743f5c1eaf36d6814b9a4ce63170e520bfe0c07" }, "downloads": -1, "filename": "vthread-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5979aacaccd2d0613d7b046f34c2ef17", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9676, "upload_time": "2018-07-17T07:35:41", "url": "https://files.pythonhosted.org/packages/26/fc/78f60c5380456382ac2aa42453794ee923b56b4a492b218c07375438a063/vthread-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b97382e933959a591e3ebd31642c618a", "sha256": "246e4499ed705da834710617dda3dbbf3fe461d9cd27d1aa1f44aae54da09cd0" }, "downloads": -1, "filename": "vthread-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b97382e933959a591e3ebd31642c618a", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10919, "upload_time": "2018-08-05T01:37:00", "url": "https://files.pythonhosted.org/packages/1f/d1/c8fb0bdde2c552df2cbea890526cda3bd6e2f32f1525894799da3aad102b/vthread-0.1.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b97382e933959a591e3ebd31642c618a", "sha256": "246e4499ed705da834710617dda3dbbf3fe461d9cd27d1aa1f44aae54da09cd0" }, "downloads": -1, "filename": "vthread-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b97382e933959a591e3ebd31642c618a", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10919, "upload_time": "2018-08-05T01:37:00", "url": "https://files.pythonhosted.org/packages/1f/d1/c8fb0bdde2c552df2cbea890526cda3bd6e2f32f1525894799da3aad102b/vthread-0.1.1-py3-none-any.whl" } ] }