Thread establishing and processing method and apparatus
The present invention provides a thread establishing and processing scheme based on a thread template. The scheme comprises: receiving a thread establishing request belonging to at least one thread type, wherein the thread establishing request comprises a request processing parameter matching the th...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The present invention provides a thread establishing and processing scheme based on a thread template. The scheme comprises: receiving a thread establishing request belonging to at least one thread type, wherein the thread establishing request comprises a request processing parameter matching the thread type that the request belongs to; then determining a thread template matching the thread type according to the thread establishing request; combining the request processing parameter with the thread template; and creating a thread corresponding to the thread establishing request, and executing a corresponding task. When a thread call volume is relatively large, a situation that a CPU runs a large amount of repeated work, which results from calling a thread in a uniform method and results in consumption of a large number of CPU resources of a system, can be avoided by the scheme, thereby improving thread running efficiency, improving development efficiency, further improving cohesion of internal software program codes and reducing coupling, so that overall internal frame structure quality of a program is improved, and final-period maintenance performed on the program by software developers is facilitated. |
---|