We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello there,
I noticed that a couple of methods on ZkClient do this. For example:
ZkClient
def setDataOf[F[_]: Async: ContextShift](zk: ZooKeeper,node: ZkNode, data: Option[Chunk[Byte]], version: Option[Int]): F[Option[ZkStat]] = Async[F].async[Option[ZkStat]] { cb => zk.setData(node.path, data.map(_.toArray).orNull,version.getOrElse(-1), mkStatCallBack(cb), null) } <* implicitly[ContextShift[F]].shift def existsNow[F[_]: Async: ContextShift](zk: ZooKeeper, node: ZkNode): F[Option[ZkStat]] = Async[F].async[Option[ZkStat]] { cb => zk.exists(node.path, false, mkStatCallBack(cb), null) } <* implicitly[ContextShift[F]].shift
It would be much better to use guarantee so even in case of a failure scenario, shifting will happen no matter what.
guarantee
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello there,
I noticed that a couple of methods on
ZkClient
do this. For example:It would be much better to use
guarantee
so even in case of a failure scenario, shifting will happen no matter what.The text was updated successfully, but these errors were encountered: