[Twisted-Python] Looking for some advice debugging issue with transport.write calls
Brian Costlow
brian.costlow at gmail.com
Tue Apr 28 05:43:08 MDT 2015
On Mon, Apr 27, 2015 at 4:55 PM, Glyph Lefkowitz <glyph at twistedmatrix.com>
wrote:
>
> Nothing strikes me as obviously wrong about this code (except the
> "deferToThread" which seems *slightly*
> suspicious, since nothing in the example appears to have anything to do
> with threads, and whenever you get threads involved things get complicated).
>
>
The deferToThread just shoves the write of the message string to file into
the thread pool. It was added after this issue was observed. Using
deferToThread
is a hangover from attaching a logging callback when the file wrote, since
removed, so callInThread would work also. I didn't want to add the file
write onto the reactor thread here.
I wish I could find a simpler case, but frankly, I have an integration test
system that uses a test app to generate upstream messages, and an open
source java app to simulate the downstream server. I can't reproduce this
there even with all the moving parts.
Happening "in the wild" at one location, was hoping for some advice on
troubleshooting what happens between calling transport.write and seeing
bytes on the wire. I guess it's time to go digging into parts of twisted
I've always taken for granted, and learn something new. ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20150428/19d67725/attachment-0002.html>
More information about the Twisted-Python
mailing list