Check patentability & draft patents in minutes with Patsnap Eureka AI!

Thread detection method and terminal

A technology for detecting threads and threads, applied in the field of detecting threads, can solve problems such as threads not getting return results, waste of terminal resources, and end users unable to know the specific reasons for thread exceptions.

Active Publication Date: 2017-12-08
TENCENT TECH (SHENZHEN) CO LTD
View PDF12 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, the end user cannot know why the running of the thread did not get the expected return result
For the specific cause of the exception, technical developers need to search the logs in the background database for manual analysis, so that the end user cannot know the specific cause of the thread exception. If the end user runs the thread repeatedly, it still cannot get the expected return result. The resulting waste of terminal resources

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
  • Thread detection method and terminal
  • Thread detection method and terminal
  • Thread detection method and terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] Embodiments of the present invention provide a thread detection method and a terminal, which are used for the terminal to acquire the cause of abnormality of the thread and avoid waste of terminal resources.

[0030] The technical solutions in the embodiments of the present application are described below with reference to the drawings in the embodiments of the present application.

[0031] refer to figure 1 As shown, one embodiment of the method for detecting thread in the embodiment of the present invention includes:

[0032] 101. Obtain a thread parameter, where the thread parameter is an execution object of the thread;

[0033] A thread, as the smallest unit of program execution flow, often gets an execution result after being run and outputs the execution result to the end user. For example, running a thread once can generate a report. Before the terminal runs a thread, it needs to obtain the thread parameters of the thread. The thread parameters can include the ...

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

Embodiments of the invention disclose a thread detection method and a terminal. The method is used for reducing waste of terminal resources. The method comprises the steps of obtaining a thread parameter by the terminal, wherein the thread parameter is an executive object of a thread; running the thread according to the thread parameter; when it is detected that the thread is abnormal, obtaining abnormal feedback information of the thread, wherein the abnormal feedback information comprises a reason for enabling the thread to be abnormal; outputting the abnormal feedback information; adjusting the thread parameter according to the abnormal feedback information; and running the thread according to the adjusted thread parameter. When the terminal runs the thread and the thread is abnormal, the reason for enabling the thread to be abnormal is returned to the terminal through the abnormal feedback information; the terminal outputs the abnormal feedback information to a terminal user; the terminal adjusts the thread parameter according to the abnormal feedback information; and the thread runs according to the adjusted thread parameter, so that the waste of the terminal resources due to the fact that the terminal user runs the thread through the wrong thread parameter for multiple times is avoided.

Description

technical field [0001] The invention relates to the field of terminals, in particular to a method for detecting threads and a terminal. Background technique [0002] A thread, sometimes called a Lightweight Process (LWP), is the smallest unit of program execution flow. The success of the thread is not 100% guaranteed when it is running, and various errors or exceptions may occur. When an error or exception occurs, the usual processing method is to capture the exception in the thread, record the log, and exit the thread. [0003] The processing modes of threads in different programming languages ​​are different, such as C language threads, C++ language threads, and Python language threads, and the thread return processing modes of the three are different. Wherein the processing of the Python language thread is a "black box". In the prior art, when an exception occurs in the Python language thread, it usually catches an exception at any position where the thread may have an e...

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): G06F11/36
CPCG06F11/3612
Inventor 余颖
Owner TENCENT TECH (SHENZHEN) CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More