Task allocation method based on thread pool
A task allocation and thread pool technology, applied in the field of multithreading and queues, can solve problems affecting software operation efficiency, unsaturated load of computer or terminal tasks, etc., to achieve the effect of direct task allocation, avoid creation and call, and avoid deadlock
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings, so that those skilled in the art can implement it with reference to the description.
[0046] The invention discloses a task allocation method based on a thread pool, such as figure 1 As shown, the method includes at least:
[0047] Step 1: Create a thread pool and a task pool; these two pools will not be released automatically before the software is closed to avoid resource waste caused by thread creation and switching, and all threads in the thread pool are in a waiting state. The specific examples of creating thread pool and task pool are as follows figure 2 shown.
[0048] Step 2, determining the value n according to the number of cores i of the processor chip; initializing n threads and storing the threads sequentially in the thread pool queue;
[0049] The calculation formula of the quantity value n is: n=i*2+2; (1)
[0050] Wherein, i represents the...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com