From 072103ab67f6e789a9616c9f1dc3af1c2bf68ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sun, 20 Apr 2025 00:45:16 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-tests:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20extra/cursor-closing=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D1=81=D1=82=D0=B0=D1=80=D1=8B=D1=85=20?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BD=D0=B4=D0=B0=D1=80=D1=82=D0=BE=D0=B2=20?= =?UTF-8?q?C++.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/extra/cursor_closing.c++ | 4 ++++ 1 file changed, 4 insertions(+) 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) {