SocketChannel bidirectional read/write
Alan Bateman
Alan.Bateman at oracle.com
Mon Jan 16 01:55:30 PST 2012
On 16/01/2012 05:18, Sebastian Sickelmann wrote:
> Hi, i think it is because of the
> synchronized (writeLock) {
> and
> synchronized (readLock) {
>
> blocks.
>
> Maybe there is a way to improve this to some amount of lesser locking.
> But i haven't looked into this topic.
>
> -- Sebastian
>
I don't think there is sufficient information in the original mail. This
may be a case where the TCP receive window size should be increased as
it may be limiting through-put. As regards the read and write locks -
they are distinct locks and so shouldn't impact a concurrent reader and
writer (and it wouldn't make sense to have concurrent readers or
concurrent writers as SocketChannel is to a stream connection).
-Alan.
More information about the nio-discuss
mailing list