From 4399273ab5b41a50c2f845d02acab461ab5dd23b Mon Sep 17 00:00:00 2001 From: Madan Kumar Date: Tue, 25 Aug 2026 16:35:43 +0530 Subject: [PATCH] Fix inverted notify/notify_all in BQueue.Interrupt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BQueue.Interrupt(notifyAll) called notify() when notifyAll was True and notify_all() when it was False — the opposite of the parameter's meaning. As a result, Interrupt(notifyAll=True) woke only a single blocked Get() waiter instead of all of them. Swap the two branches so the parameter behaves as documented. --- unitree_sdk2py/utils/bqueue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unitree_sdk2py/utils/bqueue.py b/unitree_sdk2py/utils/bqueue.py index a612bfb4..ddd3298b 100644 --- a/unitree_sdk2py/utils/bqueue.py +++ b/unitree_sdk2py/utils/bqueue.py @@ -53,6 +53,6 @@ def Size(self): def Interrupt(self, notifyAll: bool = False): with self.__condition: if notifyAll: - self.__condition.notify() - else: self.__condition.notify_all() + else: + self.__condition.notify()