Advanced concurrancy

Calvin Spealman ironfroggy at gmail.com
Mon Aug 1 11:08:58 EDT 2005


On 28 Jul 2005 10:41:54 -0700, jemfinch at gmail.com <jemfinch at gmail.com> wrote:
> Asynchrony is not concurrency.  If you have to turn your code "inside
> out," (that is, if you have to write your code such that the library
> calls your code, rather than vice versa) it's very much *not*
> concurrency: it's just asynchrony.
> 
> While Twisted makes asynchronous code relatively easy to write and
> maintain, it's just not concurrency.  I can't simply drop my
> single-threaded code into it and have it work, like I can with a truly
> concurrent system.
> 
> Jeremy

When you can ever just "simply drop" any single-threaded code into an
enviroment where it is sharing the resources and data with other
executing code simulataniously, it just "have it work", that will be
the day. Unfortunately, in practice, this simply is not how things
work. For code to operate peacefully together, it must be designed to
do so. Even when code is running in seperate processes, they must work
together to share some resources, and that is simply the way of
things. Concurrency can not (and perhaps should not) be an automatic
fix-all pill.



More information about the Python-list mailing list