From c13f24d55fea3bfafcc12851f7d5ea52797dbd6e Mon Sep 17 00:00:00 2001 From: Zifeng Deng Date: Thu, 9 Nov 2023 22:15:12 +0800 Subject: [PATCH] feat(io_context): no require lock_free in local spsc_cursor --- include/co_context/detail/spsc_cursor.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/co_context/detail/spsc_cursor.hpp b/include/co_context/detail/spsc_cursor.hpp index cebcf3f..c84feb4 100644 --- a/include/co_context/detail/spsc_cursor.hpp +++ b/include/co_context/detail/spsc_cursor.hpp @@ -14,7 +14,7 @@ template< bool is_blocking = is_thread_safe> struct spsc_cursor { static_assert(std::has_single_bit(capacity)); - static_assert(std::atomic::is_always_lock_free); + static_assert(!is_thread_safe || std::atomic::is_always_lock_free); static_assert( is_thread_safe || !is_blocking, "a thread-unsafe instance "