目录

Overview of Inter-Thread Communication Objects

In multithreaded concurrency scenarios, such as creating background threads via TaskPool or Worker, data interaction between different threads is necessary. Due to memory isolation between threads, inter-thread communication objects must implement value copying or memory sharing through serialization.

  • A maximum of 16 MB data can be serialized at a time.
  • Serialization does not support complex types decorated with decorators such as @State, @Prop, and @Link.

Currently, ArkTS supports the following types of objects for inter-thread communication: