Github user bbende commented on the pull request:
https://github.com/apache/nifi/pull/189#issuecomment-174575236
So I originally thought about removing the loop in close() which would
avoid the locking as you suggested, but I wasn't 100% sure if selector.close()
also closed the channels. The JavaDoc says:
* <p> Any uncancelled keys still associated with this selector are
* invalidated, their channels are deregistered, and any other resources
* associated with this selector are released.
As long as "any other resources associated with this selector are released"
means "all the channels are closed" then we are good.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---