Delay task performance method and device

A task execution and task technology, applied in the computer field, can solve problems such as thread expansion, equipment collapse, task loss, etc., and achieve the effect of improving stability

Active Publication Date: 2017-10-24
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF6 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art: first, the method of calling the Thread.sleep () function, the delay processing of the task and the execution of the task are carried out by the same device, if If there is a problem with the device, or when it is restarted or redeployed, all tasks on the device will be lost, and the delay information of the cor

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
  • Delay task performance method and device
  • Delay task performance method and device
  • Delay task performance method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0044] Embodiments of the present invention provide a method for delaying task execution, such as figure 1 As shown, the method includes: step S101 and step S102.

[0045] Step S101 includes a task adding step and a task removing step. In the present invention, the operation objects of adding tasks and removing tasks in the task adding step and task removing step are one...

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 delay task performance method and device and relates to the technical field of a computer. One embodiment of the method comprises the steps of extracting all tasks in a window from the special window in a queue according to a preset time period with duration of T, wherein the window of which tasks are extracted is determined through the time of extracting the tasks, when the tasks are added, the window for adding the tasks in the queue is determined according to the current time of adding the tasks, thereby adding the tasks to the window, the window for adding the tasks and the determined window of which tasks are extracted in the time period after preset delay duration KT are the same window, and the K is a positive integer; and performing the extracted tasks. According to the embodiment of the invention, distributed delay processing can be supported, and when the performance of the plurality of tasks is delayed, excessive threads do not need to be started, so the system stability is improved.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a method and device for delaying task execution. Background technique [0002] At present, when it is necessary to delay the execution of the task, the usual method is to implement it by calling the Thread.sleep() function of java. The Thread.sleep() function will suspend the thread executing the task for a period of time. After the time is over, the thread will be woken up, so as to realize the delayed execution of the task. [0003] In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art: first, the method of calling Thread.sleep () function, the delay processing of the task and the execution of the task are carried out by the same device, if When the device has a problem, or restarts, or redeploys, all tasks on the device will be lost, and the delay information of the corresponding tasks will also...

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
IPC IPC(8): G06F9/54G06F9/44
CPCG06F9/546G06F2209/548
Inventor 马盼盼魏大安
Owner BEIJING JINGDONG SHANGKE INFORMATION 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