Update Programming Guide
@@ -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]]
|
||||||
Reference in New Issue
Block a user