apache/httpcore — pull request #7 by hirthwork (2014-11-11 13:24:46+00:00)
Title: Reduce synchronized scopes in IOSessionImpl

Currently IOSessionImpl has too many synchronized methods which results in poor performance on high load.
Changes consist of two commits:
First one removes synchronization from lastRead/Write/AccessTime variables access and makes this variables volatile.
Second one introduces double checks for status member-field which is already volatile. At the same time, synchronized (this) scope in IOSessionImpl.close() reduced to have double checks faster.
In order to avoid CancelledKeyException in .toString() member-function key cancellation is made in scope synchronized on this key.