零开销抽象
This commit is contained in:
+4
-3
@@ -72,8 +72,9 @@ This is the structural definition of the type.
|
||||
|
||||
`Property_Object<T>` provides:
|
||||
|
||||
- resolved lock-slot topology;
|
||||
- per-instance mutex storage;
|
||||
- a type-shared resolved default lock-slot topology;
|
||||
- per-instance mutex storage only when the selected lock policy requires real mutexes;
|
||||
- a compact per-instance topology only for explicit synchronization overrides;
|
||||
- managed typed reads and writes;
|
||||
- capability views;
|
||||
- static and runtime multi-property guards;
|
||||
@@ -84,7 +85,7 @@ This is instance behavior, not schema identity.
|
||||
|
||||
### 3.3 Design rule
|
||||
|
||||
Do not move instance state into the schema, and do not make schema metadata depend on one particular instance-management policy.
|
||||
Do not move mutable instance synchronization state into the schema, and do not make schema metadata depend on one particular instance-management policy. Immutable topology derived from the type-level default plan may be shared across all instances of that type.
|
||||
|
||||
A future user may want to describe a large number of plain objects without paying per-object synchronization cost. The architecture should continue to leave that possibility open.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user