harmony 鸿蒙ArkCompiler Subsystem Changelog
ArkCompiler Subsystem Changelog
cl.arkcompiler.1 Repair of the Sendable Class Assignment Check in Hotspot Functions
Reason for Change
This change is made to fix the Sendable class assignment check issues in hotspot functions.
Change Impact
This change is non-compatible.
- Sendable data is used to address performance issues with cross-thread data transfer. For an introduction to its use, see Sendable Development.
- Some constraints were not checked in hotspot functions. As a result, these constraints may be bypassed.
- The following are the constraints bypassed in this change.
|\@Sendable Class Decorator |Description |
|————————-|———————————————————————-|
|Property type restrictions for decorated objects|1. The following types are supported: string, number, boolean, bigint, null, undefined, Sendable class, collections.Array, collections.Map, and collections.Set.
2. Closure variables are not allowed.
3. Private properties must be defined using private, rather than the number sign (#).
4. Computed properties are not supported.|
- For violations of the property type restrictions:
- Before change: The program runs normally without errors.
- After change: The program throws an exception at the point of constraint violation, indicating that the assignment type does not match. You need to adapt according to the requirements of property type restrictions in Sendable Development.
API Level
11
Change Since
OpenHarmony_4.1.6.5
Key API/Component Changes
@Sendable decorator
Adaptation Guide
After this change, if a type mismatch exception occurs at runtime, it may violate the usage constraints, and it is necessary to check the assignment types. For detailed instructions, see Sendable Development.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Ability Subsystem Changelog
harmony 鸿蒙ArkUI Subsystem Changelog
harmony 鸿蒙ArkWeb Subsystem Changelog
harmony 鸿蒙Distributed Data Management Subsystem Changelog
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦