Message260367
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()) |
|
Date |
User |
Action |
Args |
2016-02-16 20:47:24 | ngg | set | recipients:
+ ngg |
2016-02-16 20:47:24 | ngg | set | messageid: <1455655644.91.0.36699489167.issue26371@psf.upfronthosting.co.za> |
2016-02-16 20:47:24 | ngg | link | issue26371 messages |
2016-02-16 20:47:24 | ngg | create | |
|