Unlock instant, AI-driven research and patent intelligence for your innovation.
A task execution method and device
What is Al technical title?
Al technical title is built by PatSnap Al team. It summarizes the technical point description of the patent document.
A task execution and task technology, applied in the computer field, can solve problems such as low efficiency and untimely processing
Active Publication Date: 2020-07-31
WUHAN DOUYU NETWORK TECH CO LTD
View PDF7 Cites 0 Cited by
Summary
Abstract
Description
Claims
Application Information
AI Technical Summary
This helps you quickly interpret patents by identifying the three key elements:
Problems solved by technology
Method used
Benefits of technology
Problems solved by technology
[0004] The present invention provides a task execution method and device, which solves the problems of untimely processing and low efficiency in the prior art through manual detection of deadlocks
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
Click on the blue label to locate the original text in one second.
Reading with bidirectional positioning of images and text.
Smart Image
Examples
Experimental program
Comparison scheme
Effect test
Embodiment 1
[0052] Embodiment 1 of the present invention provides a task execution method, please refer to figure 1 , the method includes:
[0053] S101. Add a protection parameter to the task queue function, and set the state of the target task of the first thread through the protection parameter, and the state of the target task includes a protected state and an unprotected state.
[0054] In the Windows operating system, each thread has its own APC (Asynchronous Procedure Call, asynchronous procedure call) queue, and any other thread can call the queuing function QueueUserAPC to deliver a task to the thread. Among them, the function of the queuing function QueueUserAPC is to add an APC object to the APC queue of the specified thread; if the thread is in the wakeable state, then the thread will execute all the tasks in the APC queue, and the first thread will deliver the target task to In the method executed in the second thread, the task queue function QueueTaskUntilComplete is used t...
Embodiment 2
[0090] Embodiment 2 of the present invention provides a task execution device, please refer to figure 2 , the device includes:
[0091] The first setting unit 201 is configured to add a protection parameter in the task queue function, and set the state of the target task of the first thread through the protection parameter, and the state of the target task includes a protection state and an unprotected state;
[0092] The second setting unit 202 is configured to set the state of the second thread through the protected thread function, the state of the second thread includes a protected state and an unprotected state;
[0093] The creating unit 203 is configured to create an asynchronous call parameter structure object, and the asynchronous call parameter structure object includes a task member, a protection field and a callback field, wherein the target task is assigned to the task member, and the protection parameter is assigned a value For the protection field, assign a ca...
Embodiment 3
[0101] Based on the same inventive concept, this embodiment provides a computer device 300, such as image 3 As shown, it includes a memory 310, a processor 320, and a computer program 311 stored on the memory 310 and operable on the processor 320. When the processor 320 executes the computer program 311, all the steps of the first embodiment above can be realized. Therefore, in This will not be repeated here.
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
Login to View More
Abstract
The invention provides a task execution method. The method comprises the following steps: setting a state of a target task of a first thread through a protection parameter; setting a state of the second thread by a protection thread function; creating asynchronous invocation parameter structure object; delivering the asynchronous invocation parameter structure object to the second thread; identifying a target task and a state of the second thread; if both of them are in the protection state, judging whether the first thread is executing the asynchronous calling task or not, and executing one of the following actions according to the judgement result: when the first thread is executing the asynchronous calling task, issuing a deadlock alarm; when the first thread is not executing the asynchronous call task, delivering the asynchronous call parameter structure object and the asynchronous call routine function to the second thread; if at least one of the target task and the second threadis unprotected, executing the target task. Deadlocks can be detected automatically to improve work efficiency.
Description
technical field [0001] The present invention relates to the field of computer technology, in particular to a task execution method and device. Background technique [0002] In Windows multi-threaded program development, due to the different functions of each thread, it is often necessary to combine multi-threaded work. One of the multi-threaded cooperation methods is to deliver the target task of the first thread to the second thread for execution. After the task is completed in the second thread, the execution result is returned to the first thread. [0003] In the above method of delivering the target task of the first thread to the second thread for execution, a deadlock situation may occur, that is, two threads wait for each other to complete the task first. However, when a deadlock occurs, it can only be detected manually, and there are problems of untimely processing and low efficiency. Contents of the invention [0004] The invention provides a task execution meth...
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
Application Date:The date an application was filed.
Publication Date:The date a patent or application was officially published.
First Publication Date:The earliest publication date of a patent with the same application number.
Issue Date:Publication date of the patent grant document.
PCT Entry Date:The Entry date of PCT National Phase.
Estimated Expiry Date:The statutory expiry date of a patent right according to the Patent Law, and it is the longest term of protection that the patent right can achieve without the termination of the patent right due to other reasons(Term extension factor has been taken into account ).
Invalid Date:Actual expiry date is based on effective date or publication date of legal transaction data of invalid patent.