From 7835a5f24ec01cfe251f1a400d35de11f4f61057 Mon Sep 17 00:00:00 2001 From: wokron Date: Sat, 20 Jun 2026 14:00:30 +0800 Subject: [PATCH 1/2] remove set_ring_size test --- tests/test_ring_settings.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/tests/test_ring_settings.cpp b/tests/test_ring_settings.cpp index 5b75dfec..a4f62692 100644 --- a/tests/test_ring_settings.cpp +++ b/tests/test_ring_settings.cpp @@ -94,30 +94,6 @@ TEST_CASE("test ring_settings - clock") { } #endif -#if !IO_URING_CHECK_VERSION(2, 9) // >= 2.9 -TEST_CASE("test ring_settings - rings_size") { - // Defer taskrun is required - condy::Runtime runtime(condy::RuntimeOptions().enable_defer_taskrun()); - - auto func = [&]() -> condy::Coro { - for (int i = 0; i < 5; i++) { - co_await condy::async_nop(); - } - auto &settings = runtime.settings(); - io_uring_params params = {}; - params.sq_entries = 2; - params.cq_entries = 4; - // Set at runtime is ok - REQUIRE(settings.set_rings_size(¶ms) == 0); - for (int i = 0; i < 5; i++) { - co_await condy::async_nop(); - } - }; - - condy::sync_wait(runtime, func()); -} -#endif - #if !IO_URING_CHECK_VERSION(2, 10) // >= 2.10 TEST_CASE("test ring_settings - iowait") { condy::Runtime runtime; From 19a4a903cac2a9867549cb394dace3deb6e0f5cd Mon Sep 17 00:00:00 2001 From: wokron Date: Sat, 20 Jun 2026 14:02:28 +0800 Subject: [PATCH 2/2] deprecate set_rings_size --- include/condy/ring_settings.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/condy/ring_settings.hpp b/include/condy/ring_settings.hpp index f9495bb0..3caa83e3 100644 --- a/include/condy/ring_settings.hpp +++ b/include/condy/ring_settings.hpp @@ -252,8 +252,10 @@ class RingSettings { /** * @brief Resize the rings of the io_uring instance. * @details See io_uring_resize_rings for more details. + * @deprecated Unsafe during CQE processing; use RuntimeOptions instead. * @param params Pointer to the io_uring_params structure. */ + [[deprecated("unsafe during CQE processing, use RuntimeOptions")]] int set_rings_size(io_uring_params *params) noexcept { return io_uring_resize_rings(&ring_, params); }