Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Asynchronous task execution method, device and system

A technology of asynchronous execution and tasks, applied in the computer field, can solve problems such as increasing CPU consumption and affecting processor performance, and achieve the effect of improving performance

Active Publication Date: 2017-07-25
ALIBABA GRP HLDG LTD
View PDF4 Cites 42 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The present application provides a task processing method, device and system, which no longer use the thread pool to process tasks that may be blocked, thereby solving the problem of increasing CPU consumption and affecting the processor caused by the processing of tasks that may be blocked by the thread pool. performance problem

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Asynchronous task execution method, device and system
  • Asynchronous task execution method, device and system
  • Asynchronous task execution method, device and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0075] The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0076] The inventor of the present application found in the process of researching the background technology:

[0077] With regard to the background technology shown in this application, the fundamental reason affecting processor performance is that a thread sends a possibly blocked task to a thread pool, and the thread pool schedules and processes the task. This leads to frequent thread switching in the thread pool and frequent use of lock mechanisms to ensure data synchronization,...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides an asynchronous task execution method, device and system. The method comprises the following steps of: when the current thread submits the current task to a thread pool through a thread pool API, establishing a corresponding current coroutine for the current task under the current thread, wherein the current task is a task, possible to be blocked, determined by the current thread in the execution process; and processing the current task by utilizing the current coroutine. According to the method, device and system, when the current thread of an application program determines that the execution of the current task is possible to be blocked, the current task is not sent to a task queue of the thread pool, namely, the current task is not scheduled and processed by the thread pool; and a coroutine is newly established under the current thread and the current task is processed by the coroutine. Therefore, the method, device and system can solve the problems that the consumption of a CPU is increased and the performance of a processor is influenced as the task possible to be blocked is processed by the thread pool.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular to a task asynchronous execution method, device and system. Background technique [0002] Currently, multiple applications can run on the processor, and the client can send tasks to the applications in the processor. [0003] In order to increase the processing rate of tasks in the application, the current processor can build a thread pool. The thread pool is a collection of multiple threads pre-established in the operating system of the processor. Among them, the thread is the smallest unit that the operating system can perform operation scheduling. Generally speaking, the thread can be regarded as the execution unit of the task. In order to process the tasks in the application programs, the processor can assign a thread to each application program, and the threads process the tasks in the application programs. Since the processor can process multiple threads conc...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54G06F9/50
CPCG06F9/5027G06F9/546G06F9/547G06F2209/541
Inventor 郁磊张同宝赵海平
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products