Message8166

Author calmh
Recipients calmh
Date 2013-10-30.20:09:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383163750.51.0.323087385744.issue2102@psf.upfronthosting.co.za>
In-reply-to
Content
See echo-test.py. It connects to the local echo server (assuming it exists; it's supposed to simply echo all data) and starts two threads. One writes ~100 hellos per second, the other reads them as fast as possible and prints. When run with python this has the expected behavior:

jb@udev:~$ python echo-test.py 
hello
hello
hello
hello
hello
hello
...etc

With jython:

jb@udev:~$ jython echo-test.py 
hello
read timeout
hello
read timeout
hello
read timeout
...etc

The behavior seems to be that recv() blocks sendall(). When recv() times out, one sendall() completes and the next read reads the line, followed by another timeout.

Jython 2.5.1+ (Release_2_5_1, Oct 31 2011, 11:44:27) 
[OpenJDK 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_27
History
Date User Action Args
2013-10-30 20:09:10calmhsetmessageid: <1383163750.51.0.323087385744.issue2102@psf.upfronthosting.co.za>
2013-10-30 20:09:10calmhsetrecipients: + calmh
2013-10-30 20:09:10calmhlinkissue2102 messages
2013-10-30 20:09:10calmhcreate