Distribution method and device for scan task
A scanning task and distribution method technology, which is applied in the field of scanning task distribution, can solve the problems of unsatisfactory scanning efficiency, slow scanning speed, and inability to make full use of multi-core central processing units, so as to avoid thread synchronization overhead and improve scanning efficiency Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0020] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings.
[0021] figure 1 It is a flowchart of a method for allocating scanning tasks according to an embodiment of the present invention.
[0022] like figure 1 As shown, the method includes:
[0023] Step 101: Create a thread pool, which contains n threads, where n is a natural number.
[0024] Here, a thread pool is created first, wherein preferably there are multiple (at least two) threads in the thread pool. The thread pool is a form of multi-thread processing. During the processing, tasks are added to the task queue. After the thread is created, the thread is first started and the thread specifically executes the tasks in the task queue.
[0025] Preferably, the number of threads in the thread pool is consistent with the number of logical cores of the central proc...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 