asynchat and threading

"Martin v. Löwis" martin at v.loewis.de
Wed Nov 24 17:05:56 EST 2004


Michele Simionato wrote:
> Well, I had just started playing with asynchat, and I would like to
> know
> more about its shortcomings. Are you saying there are bugs in its
> implementation in the standard library? What exactly can go wrong?
> Or it is just ill designed and unconvenient to use?

AFAICT, the main complaint is that it is tied to the TCP transport,
the sockets API, and the select/poll API. IOW, it cannot easily:
- integrate TLS on top of TCP (because TLS might involve no-data
   communications, e.g. when TLS negotation happens in the middle
   of a TLS session),
- integrate other transports, such as serial ports on Windows,
- integrate other multi-endpoint wait APIs, such as IO completion
   ports on Windows NT+, or kqueue on BSD.
It appears that the first limitation is considered the most serious
one, as it doesn't allow to implement networking protocols
independent of the transport protocol (which reportedly is possible
with twisted).

Regards,
Martin



More information about the Python-list mailing list