Skip to content

Commit ec9d49f

Browse files
committed
docs: state thread-safety contracts on condition classes
1 parent 82115eb commit ec9d49f

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

libs/server-sdk/src/data_interfaces/source/ifdv2_condition.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ namespace launchdarkly::server_side::data_interfaces {
2929
*
3030
* Close() cancels any pending internal work (e.g., a timer) without resolving
3131
* the future. After Close() returns the condition's future will not resolve.
32+
*
33+
* Implementations must be thread-safe: Execute, Inform, Close, and GetType
34+
* may be called from any thread.
3235
*/
3336
class IFDv2Condition {
3437
public:
@@ -78,6 +81,9 @@ class IFDv2Condition {
7881
/**
7982
* Builds new IFDv2Condition instances on demand. Each call to Build() produces
8083
* a fresh condition with no prior state.
84+
*
85+
* Implementations must be thread-safe: Build and GetType may be called from
86+
* any thread.
8187
*/
8288
class IFDv2ConditionFactory {
8389
public:

libs/server-sdk/src/data_systems/fdv2/conditions.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ class RecoveryConditionFactory final
137137
* type of the first condition to fire. Inform() and Close() forward to every
138138
* underlying condition. If constructed with no conditions, GetFuture()
139139
* returns a Future that never resolves.
140+
*
141+
* Not thread-safe: the caller is responsible for serializing all method
142+
* calls.
140143
*/
141144
class Conditions final {
142145
public:

0 commit comments

Comments
 (0)