[
https://issues.apache.org/jira/browse/ZOOKEEPER-4881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17892192#comment-17892192
]
Kezhu Wang commented on ZOOKEEPER-4881:
---------------------------------------
I believe synchronous {{Zookeeper::close}} would be helpful in certain cases,
such as tests, to ensure that session get closed after return.
> 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)