ok2c commented on PR #726:
URL:
https://github.com/apache/httpcomponents-core/pull/726#issuecomment-6449715395
> The check has to be under the lock: close() cancels the key while holding
it, so a check outside the lock could still race the cancellation.
@tdcornish I really want to make sure this is actually the case. As far as I
can see this should suffice, given the status is kept in an `AtomicReference`.
```
if (isStatusClosed()) {
return 0;
}
```
The lock is necessary when mutating `interestOps` of the key but should not
be necessary for a status check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]