SocketServer and broken ThreadingMixIn - patch for 2.1.1c1

Stian Soiland stain at linpro.no
Sat Jul 21 14:24:05 EDT 2001


* Michael Ströder spake thusly:
|  Stian Soiland wrote:
|  
|  I agree with Guido that it does not hurt to call close_request()
|  method more than once. Therefore your handler thread can easily call
|  close_request() without being incompatible to single-threaded
|  (checked it myself) or forking mode (did not check myself yet).

But this ought to work both ways. 

Even if we always closing the connection after running the 
handler, nothing wrong will happen if a user's code closes
the connection nicely in his (old-style) handler thread.

The advantage is that existing code (like SOAP.py) can easily 
be made threaded without doing anything else than including 
ThreadingMixIn as a subclass. After all, isn't this what 
ThreadingMixIn is for?

Why should we make a different approach for using
threaded servers or not? This close_request()-thing
is already a new thing, why not do it completely instead
of forcing users to ignore this feature 
in their programs and do the closing themself?

-- 
Stian Søiland - Trondheim, Norway - http://stain.portveien.to/

         Hvorfor har jeg ingen kjæreste? Jeg kan ikke se noen god grunn.
              Folk som er langt mindre sympatiske enn meg har kjærester.
       Idioter har kjærester. Jeg burde absolutt hatt en kjæreste. [Loe]



More information about the Python-list mailing list