This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ngg
Recipients ngg
Date 2016-02-16.20:47:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455655644.91.0.36699489167.issue26371@psf.upfronthosting.co.za>
In-reply-to
Content
The initiate_send() method in both asynchat.async_chat and asyncore.dispatcher_with_send is not a thread-safe function, but it can be called from multiple threads.

For example if asyncore.loop() runs in a background thread, and the main thread sends a message then both threads will call this.

It can result in sending (part of) the message multiple times or not sending part of it.

Possible solution:
asyncore.dispatcher_with_send.out_buffer and asynchat.async_chat.producer_fifo should be guarded with a lock (it should be locked even in writable())
History
Date User Action Args
2016-02-16 20:47:24nggsetrecipients: + ngg
2016-02-16 20:47:24nggsetmessageid: <1455655644.91.0.36699489167.issue26371@psf.upfronthosting.co.za>
2016-02-16 20:47:24ngglinkissue26371 messages
2016-02-16 20:47:24nggcreate