Method and device for processing tasks

A technology for processing tasks and tasks, applied in the computer field, can solve problems such as unachievable existing solutions, task timeout, and affecting subsequent task execution, etc.

Inactive Publication Date: 2010-06-02
CHINA ELECTRIC POWER RES INST +1
View PDF0 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] During the research process, the inventor found that the existing scheme for scheduling and executing tasks has at least the following disadvantages: if the execution of the current task takes too long, or if an exception occurs, it is easy to cause the tasks arranged behind the current task to time out. Even if the time exceeds the execution time of the subsequent tasks, thus affecting the execution of the subsequent tasks
At the same time, if there are multiple tasks that need to be executed at the same time, the existing solution cannot be implemented

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 device for processing tasks
  • Method and device for processing tasks
  • Method and device for processing tasks

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] Please refer to figure 1 , is a flow chart of a method according to an embodiment of the present invention, and may include the following steps:

[0035] Step 101: Obtain tasks to be executed;

[0036] Step 102: adding the acquired tasks into the execution queue;

[0037] Step 103: Monitor the execution queue;

[0038] Step 104: When it is found that there are tasks in the execution queue, start an execution task thread for each task.

[0039] It can be seen that in the embodiment of the invention, the tasks to be executed are obtained first, the acquired tasks are added to the execution queue, the execution queue is monitored, and when tasks are found in the execution queue, the execution task thread is started for each task . Since each task to be executed will have its own execution task thread, it will not affect the execution of other tasks, and at the same time, multiple tasks to be executed can be processed at the same time.

[0040] The present invention wi...

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 a device for processing tasks. The method comprises following steps of: acquiring tasks to be executed; adding the acquired tasks into an executing queue; monitoring the executing queue; and respectively starting executing task threads for each task while finding that a task is present in the executing queue. The method and the device ensure that the current tasks does not influence tasks behind while executing, and ensure that a plurality of tasks which are executed in the same time are processed synchronously.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method and device for processing tasks. Background technique [0002] With the development of information technology, a large number of information systems have been put into use. In order to meet the orderliness of the work, when a large number of information systems exist, it is necessary to schedule the tasks in these information systems, and then execute these tasks. [0003] Existing Java applications use a timer framework to schedule tasks. The main thread registers tasks, and the tasks registered by the main thread all have their own execution time. For the frontmost task, if it is judged that the current time does not exceed the execution time of the obtained task, then the task is executed. [0004] During the research process, the inventor found that the existing scheme for scheduling and executing tasks has at least the following disadvantages: if the exe...

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/46
Inventor 孙丕石王亚玲曹占峰尹洪苓
Owner CHINA ELECTRIC POWER RES INST
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