# Worker system overview

For games, 16ms per frame is extremely valuable, and the use of workers can reduce the burden on the logic part of the game. If the logic of each frame of the game is too heavy, it can be placed in Worker to run, and after the run is over, the result will be returned to the main thread. Worker runs in a separate global context and thread, and cannot directly call methods of the main thread. Worker does not have the ability to render.

# Small game framework worker framework

In the mini game framework, a set of framework encapsulation is implemented for the basic worker of the WeChat mini game, so that it can perform tasks every frame and interact with the main thread for data.

The packaged worker has the following capabilities -Life cycle scheduling for main environment synchronization -Easy to use shared memory -Use Job for logical abstraction

# worker task

The worker task is a piece of code that runs every frame in the worker, and it is also the main concern for developers when using the worker.

Click hereLearn more.

# Worker Basic Ability

Developers can also directly create their own multi-threaded workers without using framework capabilities, and develop according to their own needs.