[Python-Dev] threadsafe patch for asynchat (original) (raw)

Mark Edgington edgimar at lycos.com
Sun Feb 5 22:26:48 CET 2006


Does anyone have any comments about applying the following patch to asynchat? It should not affect the behavior of the module in any way for those who do not want to use the feature provided by the patch. The point of the patch is to make it easy to use asynchat in a multithreaded application. Maybe I am missing something, and the patch really doesn't make it threadsafe? Any comments would be appreciated. Also, if it looks good to everyone, feel free to use it.

-------BEGIN PATCH---------- --- asynchat.py Fri Oct 15 03:03:16 2004 +++ asynchat.py.new Sun Feb 05 22:05:42 2006 @@ -59,10 +59,11 @@ ac_in_buffer_size = 4096 ac_out_buffer_size = 4096

@@ -157,7 +158,9 @@

 def push (self, data):
     self.producer_fifo.push (simple_producer (data))

environment, since

-------END PATCH----------

-Mark



More information about the Python-Dev mailing list