lockless.h: Fixup lf_array assert

This commit is contained in:
Elad 2024-11-18 16:18:27 +02:00 committed by GitHub
parent a1c6787acd
commit 2b32cbb28f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,8 +49,8 @@ public:
if (!next)
{
// Do not allow access beyond one element more at a time
ensure(!installed && index - i == N);
// Do not allow access beyond many element more at a time
ensure(!installed && index - i < N * 2);
installed = true;
@ -78,7 +78,7 @@ public:
{
lf_array* _this = this;
using return_t = decltype(func(std::declval<T&>()));
using return_t = std::invoke_result_t<F, T&>;
while (_this)
{