{ "info": { "author": "Rodney Gomes", "author_email": "rodneygomes@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "corun\n=====\n\nAcknowledgements\n----------------\n\nI'd like to acknowledge that without the work previously done by\n**David Beazey** I probably wouldn't have such a great starting point for writing\nthis module. I started writing corun after going through his presentation found\n[here](http://www.dabeaz.com/coroutines/). From which I drew quite a bit of the\nscheduler work done in **corun**. There were a few things I decided to drop\nyield trampolining from the **corun** module because I found that it complicated\nthe code more (resulting in some performance issues that I couldn't easily\nsolve) as well as it didn't give the end module user the full control of when\nhis/her coroutine wanted to give time for the scheduler to schedule in more\nworkers. I also decided to add a few new notions which included the ability to\nput coroutines to sleep for sometime and came up with a solution similar to the\nsolution presented by David on how to make a task wait for another task to\nterminate.\n\nIntroduction\n------------\n\n**corun** is a coroutine based Python library that uses only built-in Python\nfeatures to provide a low-level event driven programming model to be used when\nyou can't scale a very common thread based approach to 10K+ concurrently\nrunning threads. Its also the case that the tasks being done by those threads is\nprimarily I/O bound and not CPU bound as at that point the coroutine approach\nmay not perform as well as a regular threaded model.\n\nThere are a few other \"similar\" libraries out there such as gevent and cogen,\nbut I found that gevent tried to hide the exact points at which your coroutine\nwas \"yielding\" to the scheduler. Cogen was closer to what I wanted but I didn't\nsee why it needed you to decorate your coroutines with the **@coro** decorator\nand their google code project hasn't been touched in 2 years and even pip or\neasy_install couldn't find some dependencies when trying to install. So I'm\nassuming that the code is unmaintained and an abadoned project at this point.\n\nRequirements\n------------\n\n * Python 2.5+\n\nInstallation\n------------\n\n\tpip install -e git+git://github.com/rlgomes/corun.git#egg=corun\n\nUsage Examples\n--------------\n\nFor examples have a look at the tests folder. I will add more samples to this\nREADME in the near future which will describe different ways of using corun.\n\nPerformance Stats\n-----------------\n\nYou can easily run the built-in tests by issuing:\n\n\tpython setup.py test\n\non a freshly checked out copy and you'll get results similar to the following:\n\n\ttest_corun (tests.concurrent_task_test.ConcurrenTaskTest) ...\n\tcorun time:\t0.269580 10000\n\tok\n\ttest_gevent (tests.concurrent_task_test.ConcurrenTaskTest) ...\n\tgevent time:\t0.497005 10000\n\tok\n\ttest_thread (tests.concurrent_task_test.ConcurrenTaskTest) ...\n\tthread time:\t1.338474 10000\n\tok\n\ttest_corun (tests.io_task_test.IOTaskTest) ...\n\tcorun time:\t0.289584 100\n\tok\n\ttest_gevent (tests.io_task_test.IOTaskTest) ...\n\tgevent time:\t3.748089 100\n\tok\n\ttest_thread (tests.io_task_test.IOTaskTest) ...\n\tthread time:\t1.230650 100\n\tok\n\tStarting tests in 3 seconds...\n\tconcurrent connection limit is 2048\n\tlistening at localhost:9999\n\ttest_1_thread (tests.urlfetch_test.URLFetchTest) ...\n\tthread time:\t4.171722 1000\n\tok\n\ttest_2_corun (tests.urlfetch_test.URLFetchTest) ...\n\tcorun time:\t0.450275 1000\n\tok\n\ttest_3_gevent (tests.urlfetch_test.URLFetchTest) ...\n\tgevent time:\t0.489684 1000\n\tok\n\n\t----------------------------------------------------------------------\n\tRan 9 tests in 17.363s\n\n\tOK\n\nThe results of my tests are pretty impressive but I realize this library still\nneeds a few features and may certainly have situations where it does not\noutperform the other two approaches.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "coroutine", "license": "Apache 2.0 License", "maintainer": null, "maintainer_email": null, "name": "corun", "package_url": "https://pypi.org/project/corun/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/corun/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/corun/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "coroutine library", "version": "0.1.0" }, "last_serial": 749381, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9118972956490db2c77f40a9b9b4a4a0", "sha256": "807a70fa001ab45c18b51848b755d8bf660ec7d155f2510d675e7f9318ba9a1f" }, "downloads": -1, "filename": "corun-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9118972956490db2c77f40a9b9b4a4a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3669, "upload_time": "2013-05-25T04:25:22", "url": "https://files.pythonhosted.org/packages/c3/7d/d67e039e877465a29ad04ef40b4abb8f9259832bd0d7116a094879f2feb2/corun-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9118972956490db2c77f40a9b9b4a4a0", "sha256": "807a70fa001ab45c18b51848b755d8bf660ec7d155f2510d675e7f9318ba9a1f" }, "downloads": -1, "filename": "corun-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9118972956490db2c77f40a9b9b4a4a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3669, "upload_time": "2013-05-25T04:25:22", "url": "https://files.pythonhosted.org/packages/c3/7d/d67e039e877465a29ad04ef40b4abb8f9259832bd0d7116a094879f2feb2/corun-0.1.0.tar.gz" } ] }