Questions about GIL and web services from a n00b
sturlamolden at yahoo.no
Sun Apr 17 10:48:44 EDT 2011
On Apr 16, 4:59 am, David Cournapeau <courn... at gmail.com> wrote:
> My experience is that if you are CPU bound, asynchronous programming
> in python can be more a curse than a blessing, mostly because the
> need to insert "scheduling points" at the right points to avoid
> blocking and because profiling becomes that much harder in something
> like twisted.
I think Raymond's argument was that multi-threaded server design does
not scale well in any language. There is a reason that Windows I/O
completion ports use a pool of worker threads, and not one thread per
asynchronous I/O request. A multi-threaded design for a webservice
will hit the wall from inscalability long before CPU saturation
becomes an issue.
More information about the Python-list