Method and module for data asynchronous processing with synchronous information callback function

A technology of asynchronous processing and data, applied in the direction of data processing power supply, electrical digital data processing, digital data processing components, etc., can solve the problems of system performance reduction, asynchronous task execution status feedback, etc., and achieve the effect of effective use of resources

Active Publication Date: 2017-03-15
WUHAN DOUYU NETWORK TECH CO LTD
View PDF6 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, when there are many asynchronous data processing tasks, enabling and recycling multi-threading will reduce the performance of the system, and the above method cannot provide feedback on the execution status of asynchronous tasks; since many logics in development need to be processed synchronously, feedback on asynchronous tasks The execution state and processing structure of the

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
  • Method and module for data asynchronous processing with synchronous information callback function
  • Method and module for data asynchronous processing with synchronous information callback function

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

[0024] see figure 1 As shown, the data asynchronous processing method with synchronous callback information function in the embodiment of the present invention includes the following steps:

[0025] S1: Create a thread pool pool that specifies the maximum number of threads, add priority to each thread of asynchronous data processing tasks, join the pool, and go to S2.

[0026] Thread pool: It is a form of multi-thread processing. During the processing, task threads are added to the queue, and then these tasks are automatically started after the threads are created; thread pool threads are all background threads. Each thread uses the default stack size, runs at the default priority, and is in a multithreaded apartment.

[0027] S2: When the thread in the pool starts, inform the outside world of the information that the data asynchronous proce...

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 discloses a method and module for data asynchronous processing with a synchronous information callback function and relates to the field of asynchronous data processing. The method comprises the steps that a thread pool with a designated maximum thread quantity is established, a priority is added to a thread of each asynchronous data processing task, and the threads are added into the pool; when the threads in the pool are started, information executed by the asynchronous data processing task corresponding to the current thread is returned; time counting is started for the current thread according to a preset time counting cycle; the pool is used to call the current thread to start working, and stack information during abnormity occurrence is determined and returned when an abnormity takes place during work of the current thread; and whether the current thread is completed is detected at scheduled time. According to the invention, the running quantity of the multiple threads can be controlled, and whether execution of the threads is completed is detected at scheduled time; and execution states of the asynchronous data processing tasks can be known, occupied resources of a CPU and consumed electric energy are reduced, and system performance can be ensured.

Description

technical field [0001] The invention relates to the field of asynchronous data processing, in particular to a data asynchronous processing method and module with a synchronous callback information function. Background technique [0002] Usually in the Android application development process, the function of asynchronous data processing is often used; since the Android UI (User Interface, user interface) interface is working on the main thread, if some very time-consuming work is not used asynchronously If it is processed directly in the main thread, it will cause the Android system APP to freeze, and even an abnormal error of ANR (Application Not Responding, application not responding) will appear in severe cases. [0003] At present, the existing Android-based asynchronous data processing method is generally as follows: each time a new task is started, a new thread will be started (a thread is a single sequential control flow in the program, and it is a relatively independe...

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/48G06F11/30G06F1/32
CPCG06F1/3206G06F1/329G06F9/4881G06F11/3017G06F11/3058Y02D10/00
Inventor 张磊
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products