client-server parallellised number crunching

Hans Georg Schaathun hg at schaathun.net
Wed Apr 27 10:15:05 EDT 2011


On Wed, 27 Apr 2011 23:35:06 +1000, Chris Angelico
  <rosuav at gmail.com> wrote:
:  On Wed, Apr 27, 2011 at 10:21 PM, Hans Georg Schaathun 
:          <hg at schaathun.net> wrote:
: > That's correct.  And the client initiates the connection.  At the
: > moment, I use one thread per connection, and don't really want to
: > spend the time to figure out how to do it singlethreadedly.
: 
:  Threads work quite happily in Python if they're I/O bound, which they
:  will be if they're waiting for the client to do something.

Quite.  I was referring to some tutorials and documentation recommending
to use non-blocking sockets and select() within a single thread.  I
cannot say that I understand why, but I can imagine the benefit with
heavy traffic.

-- 
:-- Hans Georg



More information about the Python-list mailing list