Multi-thread task scheduling method and device, medium and electronic device
A task scheduling and multi-threading technology, applied in the computer field, can solve the problems of unclear overall system structure, increased labor costs of enterprises, chaotic and cumbersome codes, etc., so as to reduce the difficulty of maintenance, save labor costs, and enhance scalability. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0050] Such as figure 1 As shown, according to the specific implementation manner of the present disclosure, in the first aspect, the present disclosure provides a multi-thread task scheduling method, including:
[0051] S1: Obtain the interface tasks provided by the business task class implementation framework;
[0052] S2: Create a framework instance, register and register a work task, the work task is to realize the interface task;
[0053] S3: Submit the work task to the framework instance, execute the work task on the framework instance, and put the execution result of the work task into a cache queue;
[0054] S4: Query the execution result through the cache queue.
[0055]Among them, the framework is a logical framework written by senior developers based on the overall business logic of the system, and junior developers only need to implement the function of a certain interface in the framework.
[0056] Optionally, executing the work task on the framework instance i...
Embodiment 2
[0074] Such as figure 2 As shown, according to the specific implementation manner of the present disclosure, in the second aspect, the present disclosure provides a multi-thread task scheduling device, including:
[0075] The obtaining unit 202 is used to obtain the external interface provided by the business task class implementation framework;
[0076] The new unit 204 is used to create a new framework instance, register and register a work task, and the work task is to realize the interface task;
[0077] an executing unit 206, configured to submit the work task to the framework instance, and execute the work task in the framework instance;
[0078] The query unit 208 is configured to query the execution result through the result queue.
[0079] Optionally, the execution unit is also used for:
[0080] caching the work tasks through a task queue;
[0081] The work task is taken out from the task queue, and the work task is executed in the thread pool.
[0082] Optiona...
Embodiment 3
[0097] This embodiment provides an electronic device, and the electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein,
[0098] The memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method steps described in the above embodiments.
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com