Update Programming Guide

2025-07-03 22:48:22 +02:00
parent fa296c74fa
commit 8a6a102aff

@@ -1,4 +1,3 @@
# Conflux Programming Guide # Conflux Programming Guide
The `Ctx` class in the `conflux` package is a lightweight, type-safe, generic, application-wide context. It provides key-based, strongly typed storage with thread-safe put/get, type consistency for each key, and listener support to observe changes. Listeners are weakly referenced to avoid memory leaks. `Ctx` is ideal for coordinating shared data among otherwise decoupled classes. The `Ctx` class in the `conflux` package is a lightweight, type-safe, generic, application-wide context. It provides key-based, strongly typed storage with thread-safe put/get, type consistency for each key, and listener support to observe changes. Listeners are weakly referenced to avoid memory leaks. `Ctx` is ideal for coordinating shared data among otherwise decoupled classes.
@@ -168,3 +167,5 @@ Ctx.INSTANCE.removeListener(temperatureKey, display);
Ctx.INSTANCE.put(temperatureKey, 30); // no notification after listener removed Ctx.INSTANCE.put(temperatureKey, 30); // no notification after listener removed
``` ```
[[Home]] | [[API Reference]] | [[Design and Architecture]] | [[FAQ]]