| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| AppScope/ | 06-May-2025 | - | 35 | 32 | ||
| class/ | 06-May-2025 | - | 420 | 374 | ||
| entry/ | 06-May-2025 | - | 777 | 704 | ||
| hvigor/ | 06-May-2025 | - | 38 | 36 | ||
| screenshots/ | 06-May-2025 | - | ||||
| .gitignore | D | 06-May-2025 | 133 | 12 | 12 | |
| README.md | D | 06-May-2025 | 3 KiB | 74 | 53 | |
| build-profile.json5 | D | 06-May-2025 | 1.5 KiB | 62 | 61 | |
| code-linter.json5 | D | 06-May-2025 | 958 | 35 | 34 | |
| hvigorfile.ts | D | 06-May-2025 | 843 | 22 | 5 | |
| oh-package.json5 | D | 06-May-2025 | 834 | 26 | 24 | |
| ohosTest.md | D | 06-May-2025 | 757 | 9 | 7 |
README.md
1# ArkTS Sendable对象简介 2 3### 介绍 4 5在传统JS引擎上,对象的并发通信开销的优化方式只有一种,就是把实现下沉到Native侧,通过[Transferable对象](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/arkts-utils/transferabled-object.md)的转移或共享方式降低并发通信开销。而开发者仍然还有大量对象并发通信的诉求,这个问题在业界的JS引擎实现上并没有得到解决。 6 7该工程中展示的代码详细描述可查如下链接: 8 9- [Sendable对象简介](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/arkts-utils/arkts-sendable.md) 10 11### 效果预览 12 13| 首页 | 执行及结果即时反馈 | 14| :----------------------------------------------------------: | :----------------------------------------------------------: | 15| <img src="./screenshots/SendableObjectIntroduction_1.png" style="zoom: 50%;" /> | <img src="./screenshots/SendableObjectIntroduction_2.png" style="zoom: 50%;" /> | 16 17### 使用说明 18 191. 在主界面,点击任意按钮进行跳转,点击Hello World执行程序 202. 执行结果会即时反馈在屏幕中央,并在控制台打印log。 21 22### 工程目录 23 24``` 25class 26 ├── Index.ets // 装饰器修饰Class使用示例 27entry/src/ 28 ├── main 29 │ ├── ets 30 │ │ ├── entryability 31 │ │ ├── entrybackupability 32 │ │ ├── managers 33 │ │ ├── classusage.ets // 装饰器修饰Class使用示例 34 │ │ ├── functionusage.ets // 装饰器修饰Function使用示例 35 │ │ ├── pages 36 │ │ ├── Index.ets // 首页 37 │ │ ├── util 38 │ │ ├── CommonButton.ets // 首页跳转UI 39 │ │ ├── resource.ets // 资源引用转换 40 │ ├── module.json5 41 │ └── resources 42 ├── ohosTest 43 │ ├── ets 44 │ │ ├── test 45 │ │ ├── Ability.test.ets // 自动化测试代码 46``` 47 48### 相关权限 49 50不涉及。 51 52### 依赖 53 54不涉及。 55 56### 约束与限制 57 581.本示例仅支持标准系统上运行, 支持设备:RK3568。 59 602.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 61 623.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。 63 64### 下载 65 66如需单独下载本工程,执行如下命令: 67 68```` 69git init 70git config core.sparsecheckout true 71echo code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/SendableObjectIntroduction > .git/info/sparse-checkout 72git remote add origin https://gitee.com/openharmony/applications_app_samples.git 73git pull origin master 74````