diff --git a/test/extra/cursor_closing.c++ b/test/extra/cursor_closing.c++ index 8ea177e4..df8278ce 100644 --- a/test/extra/cursor_closing.c++ +++ b/test/extra/cursor_closing.c++ @@ -285,11 +285,15 @@ void case1_write_cycle(mdbx::txn_managed txn, std::deque &dbi, } bool case1_thread(mdbx::env env, std::deque dbi, mdbx::cursor pre) { +#if defined(__cpp_lib_latch) && __cpp_lib_latch >= 201907L mdbx::error::success_or_throw(mdbx_txn_lock(env, false)); std::hash hasher; salt = global_seed ^ hasher(std::this_thread::get_id()); std::cout << "thread " << std::this_thread::get_id() << ", salt " << salt << std::endl << std::flush; mdbx_txn_unlock(env); +#else + salt = global_seed; +#endif std::vector pool; for (auto loop = 0; loop < 333 / RELIEF_FACTOR; ++loop) {