From 5a1f768b0389ef9a03bb2e82339a93a36b3c7338 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 14 May 2022 09:02:22 +0200 Subject: [PATCH] Update comment about lock-free property --- m-buffer.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/m-buffer.h b/m-buffer.h index baaa9ebb..9deb9bc4 100644 --- a/m-buffer.h +++ b/m-buffer.h @@ -832,7 +832,11 @@ M_C(name, _init)(buffer_t v, size_t size) \ /* Thread has been preempted by another one. */ \ return false; \ } \ - /* If it is interrupted here, it may block pop method (not push) */ \ + /* If it is interrupted here, it may block all pop methods (not push) \ + even if there is other threads that have pushed data later in the \ + queue as all pop threads will try to enqueue this particular element \ + but always fail. The won't try to enqueue other elements. \ + As such, this queue is not strictly lock-free.*/ \ if (!M_BUFF3R_POLICY_P((policy), M_BUFFER_PUSH_INIT_POP_MOVE)) { \ M_CALL_SET(oplist, table->Tab[i].x, x); \ } else { \