提交 33825e4d 编写于 作者: E Evgeniy Gatov

Merge

......@@ -2,13 +2,13 @@
#include <zkutil/ZooKeeper.h>
namespace zkutil
namespace zkutil
{
class Increment
{
public:
Increment(ZooKeeperPtr zk_, const std::string & path_)
Increment(ZooKeeperPtr zk_, const std::string & path_)
: zk(zk_), path(path_)
{
zk->createAncestors(path);
......@@ -34,8 +34,8 @@ public:
{
success = zk->tryCreate(path, std::to_string(result), zkutil::CreateMode::Persistent) == ZOK;
}
}
while(!success);
}
while (!success);
return result;
}
......@@ -45,4 +45,4 @@ private:
Logger * log = &Logger::get("zkutil::Increment");
};
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册