[Python-Dev] threadsafe patch for asynchat

Guido van Rossum guido at python.org
Thu Feb 9 20:42:21 CET 2006

On 2/7/06, Mark Edgington <edgimar at lycos.com> wrote:
> Ok, perhaps the notation could be improved, but the idea of the
> semaphore in the patch is "Does it run inside of a multithreaded
> environment, and could its push() functions be called from a different
> thread?"

The long-term fate of asyncore/asynchat aside, instead of wanting to
patch asynchat, you should be able to subclass it easily to introduce
the functionality you want. Given the disagreement over whether this
is a good thing, I suggest that that's a much better way for you to
solve your problem than to introduce yet another obscure confusing
optional parameter. And you won't have to wait for Python 2.5.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list