{ "info": { "author": "Benjamin Liles (Texas A&M University)", "author_email": "bliles@library.tamu.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Twisted", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Distributed Computing" ], "description": "Introduction\n============\n\nThe Python Global Interpreter Lock (GIL) poses some limitations on multi \nprocessor performance by locking on all pure Python code. Although the\nthreading support in twisted is excellent, the GIL was holding back performance\nby essentially keeping the process bound to a single CPU.\n\nIn order to get around the GIL, Python brought in the multiprocessing package\nas of version 2.6. The multiprocessing package has been backported to both\nPython 2.4 and 2.5 and is available from the Python Package Index\n(http://pypi.python.org/pypi). The multiprocessing package provides a similar\ninterface to the threading libraries provided by Python except that it uses\nprocesses instead of threads.\n\nThis package, twisted.internet.processes, implements a wrapper around the \nmultiprocessing library and provides a method, deferToProcess, that works\nin the same manner as deferToThread.\n\nImplementation\n==============\n\nA process pool is created on the reactor in the same manner that the thread \npool is created in the normal reactor when deferToThread is first called. \n\nInitially, the goal was to use the non-blocking code and callbacks from the\nmultiprocessing library to provide a deferToProcess method. Unfortunately, \nthe multiprocessing.Pool.apply_async does not call the callback in the event \nof a failure. In order to retain failure callbacks, the get method from the \nasynchronous result set, multiprocessing.pool.AsyncResult, is used by wrapping\nit in a call to deferToThread. The thread is blocked while waiting on the \nresults from the call in a separate process.\n\nUsing the multiprocessing.Pool.apply_async to defer to a process imposes some \nadditional requirements on the user code. All arguments and the function itself \nmust be pickleable by the Python cPickle module.\n\n\nLicense\n=======\nCopyright 2009 Texas A&M University\n \nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use \nthis file except in compliance with the License. You may obtain a copy of the \nLicense at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n \nUnless required by applicable law or agreed to in writing, software distributed \nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \nCONDITIONS OF ANY KIND, either express or implied. See the License for the \nspecific language governing permissions and limitations under the License. \n\nChangelog\n=========\n\n1.0b1 2009/08/24\n----------------\n\n* Initial release\n* Locked to multiprocessing 2.6.1.1 or below due to a bug in logging in 2.6.2.1\n* No testing yet\n* deferToProcess based on a blocking call wrapped in deferToThread", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/meercat", "keywords": "twisted multiprocessing deferToProcess", "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "twisted.internet.processes", "package_url": "https://pypi.org/project/twisted.internet.processes/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/twisted.internet.processes/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/meercat" }, "release_url": "https://pypi.org/project/twisted.internet.processes/1.0b1/", "requires_dist": null, "requires_python": null, "summary": "An implementation of deferToProcess using the multiprocessing package.", "version": "1.0b1" }, "last_serial": 745802, "releases": { "1.0b1": [ { "comment_text": "", "digests": { "md5": "cd28b1328b1aa7c235875f12b00bd44d", "sha256": "32ddcab962ed1b418bc9a47fb93b99e9e60671caa50660fe9b1fd3ab2b53ba0d" }, "downloads": -1, "filename": "twisted.internet.processes-1.0b1.tar.gz", "has_sig": false, "md5_digest": "cd28b1328b1aa7c235875f12b00bd44d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3750, "upload_time": "2009-08-24T21:27:39", "url": "https://files.pythonhosted.org/packages/22/e8/3100c41ba21d5f34a345598adc86fe19e6eea91ca4810798caa3b477738f/twisted.internet.processes-1.0b1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cd28b1328b1aa7c235875f12b00bd44d", "sha256": "32ddcab962ed1b418bc9a47fb93b99e9e60671caa50660fe9b1fd3ab2b53ba0d" }, "downloads": -1, "filename": "twisted.internet.processes-1.0b1.tar.gz", "has_sig": false, "md5_digest": "cd28b1328b1aa7c235875f12b00bd44d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3750, "upload_time": "2009-08-24T21:27:39", "url": "https://files.pythonhosted.org/packages/22/e8/3100c41ba21d5f34a345598adc86fe19e6eea91ca4810798caa3b477738f/twisted.internet.processes-1.0b1.tar.gz" } ] }