{"id":24097,"url":"https://patchwork.libcamera.org/api/patches/24097/?format=json","web_url":"https://patchwork.libcamera.org/patch/24097/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250813102501.1645940-2-barnabas.pocze@ideasonboard.com>","date":"2025-08-13T10:25:00","name":"[RFC,v2,1/2] libcamera: base: thread: Make `removeMessages()` public","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"ad513112133082aeaac1b2423ab2b3d3ac6498b9","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/?format=json","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/24097/mbox/","series":[{"id":5371,"url":"https://patchwork.libcamera.org/api/series/5371/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5371","date":"2025-08-13T10:24:59","name":"libcamera: pipeline: virtual: Move image generation to separate thread","version":2,"mbox":"https://patchwork.libcamera.org/series/5371/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/24097/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/24097/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E369EBDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Aug 2025 10:25:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DB0E369250;\n\tWed, 13 Aug 2025 12:25:07 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F13686922C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Aug 2025 12:25:04 +0200 (CEST)","from pb-laptop.local (185.221.141.188.nat.pool.zt.hu\n\t[185.221.141.188])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E0ED346\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Aug 2025 12:24:11 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"t8D69gpq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755080651;\n\tbh=5HAUt5rRjVjrzuGazKTPnrgTw8ZKjuEOLatJGTUunxI=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=t8D69gpqm4rugSOx7+86rF8wTNxoFI4ulHTViRgDZOZqc5Dx+/rysXW7PHq6gDHfA\n\tlkU086kmSM+3n66xR5R3X063+iz9os/gZBjNZs0E94BPbbfOufosd2IC+zyCbSggmG\n\trbH8ou/cSogUhS0BRy1KCwIwufBG86J/pO/P4quc=","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[RFC PATCH v2 1/2] libcamera: base: thread: Make `removeMessages()`\n\tpublic","Date":"Wed, 13 Aug 2025 12:25:00 +0200","Message-ID":"<20250813102501.1645940-2-barnabas.pocze@ideasonboard.com>","X-Mailer":"git-send-email 2.50.1","In-Reply-To":"<20250813102501.1645940-1-barnabas.pocze@ideasonboard.com>","References":"<20250813102501.1645940-1-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Sometimes there is a need to remove pending messages of an object. For example,\nwhen the main purpose of a thread is to carry out work asynchronously using\ninvoke messages, then there might be a need to stop processing because some\nkind of state has changed. This can be done in two main ways: flushing messages\nor removing them. This changes enables the second option, which is useful if\nthe effects of the pending messages are no longer desired.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/base/thread.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/include/libcamera/base/thread.h b/include/libcamera/base/thread.h\nindex b9284c2c0..eb1a52ab1 100644\n--- a/include/libcamera/base/thread.h\n+++ b/include/libcamera/base/thread.h\n@@ -50,6 +50,7 @@ public:\n \n \tvoid dispatchMessages(Message::Type type = Message::Type::None,\n \t\t\t      Object *receiver = nullptr);\n+\tvoid removeMessages(Object *receiver);\n \n protected:\n \tint exec();\n@@ -64,7 +65,6 @@ private:\n \tvoid setThreadAffinityInternal();\n \n \tvoid postMessage(std::unique_ptr<Message> msg, Object *receiver);\n-\tvoid removeMessages(Object *receiver);\n \n \tfriend class Object;\n \tfriend class ThreadData;\n","prefixes":["RFC","v2","1/2"]}