AsynchronousSocketChannel write()

Avinash Lakshman avinash.lakshman at gmail.com
Wed Aug 18 11:35:06 PDT 2010


Hi All

I want to use the write() on the AsynchronousSocketChannel which has no
timeout semantics. I also want to pool these connections that I use. Now if
I have multiple threads writing into the same connection, even though the
writes are synchronized, I get a WritePendingException because a previous
write has not completed. What is the general paradigm for handling this? Do
I need to keep track of pending writes etc?

Please advice.

Cheers
Avinash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20100818/07a625d1/attachment.html 


More information about the nio-discuss mailing list