Message4466

Author amak
Recipients amak, kfitch42
Date 2009-04-07.16:58:21
SpamBayes Score 2.5177458e-08
Marked as misclassified No
Message-id <1239123502.64.0.760465365192.issue1304@psf.upfronthosting.co.za>
In-reply-to
Content
Just some notes as I go along.

The settimeout() call will change the way that bytes are sent on the socket.

If you do NOT use settimeout, then the bytes are sent through the
java.nio APIs. If you use settimeout, then data is sent using the
java.net APIs (because timeout's are not supported on java.nio).

We've had problems with threading and the java.net APIs before

http://bugs.jython.org/issue1744567

Particluarly, see this message

http://bugs.jython.org/msg1662

which says

"""
OK, I'm reasonably confident that this is a java bug, related to the
simultaneous use of input and output streams on a socket created by
java.nio. See these bug reports for further info

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4509080
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4774871

The problem is that the read and write methods of the InputStream and
OutputStream returned by the java.nio.channels.Channels class are
protected by a lock, which means that asocket cannot be read and written
to at the same time by different threads. 
"""
History
Date User Action Args
2009-04-07 16:58:22amaksetmessageid: <1239123502.64.0.760465365192.issue1304@psf.upfronthosting.co.za>
2009-04-07 16:58:22amaksetrecipients: + amak, kfitch42
2009-04-07 16:58:22amaklinkissue1304 messages
2009-04-07 16:58:22amakcreate