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
官网上RedLock的示例代码,在centos下如果连续调用的话,总会在某一次卡死,请问可能是什么原因?
for (int i = 0; i < 1000; i++) { sw::redis::RedMutexOptions opts; opts.ttl = std::chrono::seconds(5); auto watcher = std::make_shared<sw::redis::LockWatcher>(); // Create a `RedMutex` with auto_extend_err_callback and other options. sw::redis::RedMutex mtx({ conn }, lock_key, [](std::exception_ptr err) { try { //std::rethrow_exception(err); } catch (const Error& e) { // Notify application code that the lock might no longer be locked. } }, opts, watcher); std::unique_lock<RedMutex> lock(mtx, std::defer_lock); // ... other code }
The text was updated successfully, but these errors were encountered:
可以先升级到最新的redis-plus-plus试试,老版本的可能有问题。我用最新的redis-plus-plus,直接测试这个代码,无法复现
如果还是有问题,请提供一段最小的,可以编译通过,稳定复现的代码。谢谢!
Regards
Sorry, something went wrong.
Close the issue, since there's no update.
No branches or pull requests
官网上RedLock的示例代码,在centos下如果连续调用的话,总会在某一次卡死,请问可能是什么原因?
The text was updated successfully, but these errors were encountered: