Thread detection method, apparatus and device, and computer readable storage medium

A detection method and detection device technology, applied in calculation, error detection/correction, software testing/debugging, etc., can solve problems such as high cost of error correction, low cost of error, wrong thread setting, etc.

Inactive Publication Date: 2018-11-06
BEIJING 58 INFORMATION TTECH CO LTD
View PDF5 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, it is very easy for developers to confuse the two, or cause the wrong thread setting due to negligence, so that the code runs on the wrong thread, resulting in crashes and other problems
Because RxJava internally captures errors, it is difficult for developers to directly locate errors, resulting in a situation where the cost of error correction is huge and the cost of error is extremely low

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, apparatus and device, and computer readable storage medium
  • Thread detection method, apparatus and device, and computer readable storage medium
  • Thread detection method, apparatus and device, and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] In order to further explain the technical means and functions adopted by the present invention to achieve the intended purpose, the present invention will be described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0042] In the first embodiment of the present invention, a thread detection method is proposed, such as figure 1 As shown, the method specifically includes the following steps:

[0043] Step S101: The sub-project acquires detection rules.

[0044] Wherein, the detection rule is a pre-set rule for thread detection.

[0045] Specifically, the detection rule is generated according to the Lint tool.

[0046] In order to effectively detect thread safety issues, an effective thread detection tool is first required for thread scanning. The thread detection tool used in the embodiment of the present invention is Lint, because Lint is directly built in Android Studio, has many powerful native detection logics, and can imp...

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 thread detection method, apparatus and device, and a computer readable storage medium. The method comprises the steps of acquiring a detection rule by a sub-project; searching for a to-be-detected logic method in RxJava according to the detection rule by the sub-project, and acquiring a thread parameter type in the to-be-detected logic method; and under the condition thatthe thread parameter type in the to-be-detected logic method is inconsistent with a standard thread parameter type in the detection rule, sending warning information used for indicating thread exception by the sub-project. According to the thread detection method, apparatus and device, a thread can be detected before compilation, and error reminding is carried out on a developer in time, so thatthe problem that a thread error is generated is avoided.

Description

technical field [0001] The present invention relates to the technical field of thread detection, in particular to a thread detection method, device, equipment and computer-readable storage medium. Background technique [0002] RxJava is a very popular technology in the Android development process. RxJava is an asynchronous responsive extension programming library of Rx (ReactiveExtensions, responsive extension) for the Java language. RxJava can greatly improve development efficiency, optimize code structure, and facilitate thread switching. Therefore, many applications APP are developed through RxJava. In the process of use, along with the advantages of RxJava, some problems are increasingly exposed. Since the thread switching operation of RxJava is extremely convenient, it is easy for developers to generate thread errors during use. For example, the ObserveOn() method in RxJava determines the execution thread of Subscriber, and the SubscribeOn() method in RxJava determin...

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): G06F11/36
CPCG06F11/3644G06F11/366
Inventor 孟敬楠徐萌阳
Owner BEIJING 58 INFORMATION TTECH 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