Another page you might be interested in bookmarking:<p><a href="https://wiki.python.org/moin/PythonDecoratorLibrary" rel="nofollow">https://wiki.python.org/moin/PythonDecoratorLibrary</a><p>A similar decorator to thread function calls for concurrency:<p><a href="https://wiki.python.org/moin/PythonDecoratorLibrary#Lazy_Thunkify" rel="nofollow">https://wiki.python.org/moin/PythonDecoratorLibrary#Lazy_Thu...</a>
So, for me, replacing imap with pool.imap is the easy part. The hard part is dealing with things like handling exceptions, catching keyboard interrupts, and so on. Does this module do anything to address these issues?
A couple of things offhand:<p>- It has Python 2 and 3 support<p>- It's a wrapper for the Python built-in "multiprocessing" library<p>- It spreads out work over all cores (so the abstraction hides the ability to control the pool)<p>Seems like a great way to get your feet wet with multiprocessing in Python, but it likely has limited use in production...although certain infrastructures like resource limited containers might be able to accommodate it.
See paper at <a href="https://drive.google.com/file/d/0B_olmC0u8E3gWTBmN3pydGxHdEE/preview" rel="nofollow">https://drive.google.com/file/d/0B_olmC0u8E3gWTBmN3pydGxHdEE...</a>
With Python 3.5 there is native support for concurrency by using the keywords await and async.<p>For simple usage if you are familiar with Go there is this library:
<a href="https://github.com/pothos/awaitchannel" rel="nofollow">https://github.com/pothos/awaitchannel</a>
Of note is that the version of deco on PyPI[1] (0.2) is incompatible with Python 3.<p>There have been few commits to fix compatibility, but it's not there yet.<p>1. <a href="https://pypi.python.org/pypi/deco" rel="nofollow">https://pypi.python.org/pypi/deco</a>
Perhaps a strange choice of the word "synchronized" when coming from Java, this typically implies a critical section. Here it seems to initialize a multiprocessing pool for use in the function labelled concurrent (perhaps)?
"We have proposed DECO, a simplification of concurrent programming techniques targeted at programmers with little understanding of concurrent programming." (from paper)<p>gave me the chills
I've been looking for a way to replace functools.partial and pool.map with something that could cause me to make bad architectural decisions. This could be the ticket.