1# Thread Model (Stage Model) 2 3For an OpenHarmony application, each process has a main thread to provide the following functionalities: 4 5- Manage other threads. 6 7- Enable multiple UIAbility components of the same application to share the same main thread. 8 9- Distribute input events. 10 11- Draw the UI. 12 13- Invoke application code callbacks (event processing and lifecycle callbacks). 14 15- Receive messages sent by the worker thread. 16 17In addition to the main thread, there is an independent thread, named worker. The worker thread is mainly used to perform time-consuming operations. It cannot directly operate the UI. The worker thread is created in the main thread and is independent of the main thread. A maximum of seven worker threads can be created. 18 19 20 21Based on the OpenHarmony thread model, different services run on different threads. Service interaction requires inter-thread communication. In the same process, threads can communicate with each other in Emitter or Worker mode. Emitter is mainly used for event synchronization between threads, and Worker is mainly used to execute time-consuming tasks. 22 23> **NOTE** 24> 25> The stage model provides only the main thread and worker thread. Emitter is mainly used for event synchronization within the main thread or between the main thread and worker thread. 26