From 1def4e247a61724cb79112ac674f116d7fe3c4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Angelovi=C4=8D?= Date: Sat, 29 Dec 2018 00:59:31 +0100 Subject: [PATCH] Add note on thread-safety of Variant and its const methods --- include/sdbus-c++/Types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sdbus-c++/Types.h b/include/sdbus-c++/Types.h index 0c7f901..4d05632 100644 --- a/include/sdbus-c++/Types.h +++ b/include/sdbus-c++/Types.h @@ -40,6 +40,12 @@ namespace sdbus { * @class Variant * * Variant can hold value of any D-Bus-supported type. + * + * Note: Even though thread-aware, Variant objects are not thread-safe. + * Some const methods are conceptually const, but not physically const, + * thus are not thread-safe. This is by design: normally, clients + * should process a single Variant object in a single thread at a time. + * Otherwise they need to take care of synchronization by themselves. * ***********************************************/ class Variant