[
https://issues.apache.org/jira/browse/ZOOKEEPER-4881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17892191#comment-17892191
]
Kezhu Wang commented on ZOOKEEPER-4881:
---------------------------------------
{{ZooKeeper::closeAsync()}}(or whatever name) should also sound. The good of an
addition constructor level option is that it play well with {{AutoCloseable}}.
I am thinking whether we should provide both.
> Support non blocking ZooKeeper::close
> -------------------------------------
>
> Key: ZOOKEEPER-4881
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4881
> Project: ZooKeeper
> Issue Type: New Feature
> Reporter: Kezhu Wang
> Priority: Major
>
> {{ZooKeeper::close}} is synchronous, it waits until {{OpCode.closeSession}}
> returned. I think it would be useful to support background closing to avoid
> block caller, just like `close(2)` for socket. We probably could use
> {{ZooKeeperBuilder}} from ZOOKEEPER-4697 to manually enable it. This way we
> would not surprise anyone just like `SO_LINGER` for socket.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)