Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and system for cancelling time-consuming operation and blocking asynchronous conversion

An asynchronous and asynchronous operation technology, which is applied in the direction of communication between programs, instruments, multi-program devices, etc., can solve the problems of time-consuming operation related technical complexity, blocking asynchronous conversion, extra burden, etc.

Active Publication Date: 2021-09-07
成都市奇点软件有限公司
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] The technical problem to be solved by the present invention is that the existing time-consuming operation-related technologies have high complexity, lengthy cancellation process, and additional burden on development. The purpose is to provide a method and system for time-consuming operation cancellation and blocking asynchronous conversion , to solve the above problem

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 system for cancelling time-consuming operation and blocking asynchronous conversion
  • Method and system for cancelling time-consuming operation and blocking asynchronous conversion
  • Method and system for cancelling time-consuming operation and blocking asynchronous conversion

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0035] Please refer to figure 1 , is a schematic flowchart of a method for canceling a time-consuming operation and blocking an asynchronous conversion provided by an embodiment of the present invention. The method for canceling a time-consuming operation and blocking an asynchronous conversion can be applied to figure 2 A system for canceling and blocking asynchronous conversion of time-consuming operations, further, the method for canceling and blocking asynchronous conversion of time-consuming operations may specifically include the content described in steps S1-S4 below.

[0036] A method for canceling and blocking asynchronous transitions of time-consuming operations, comprising:

[0037] S1: Create a time-consuming operation thread, and run the time-consuming operation thread asynchronously in the background;

[0038] S2: Establish a two-state semaphore for the time-consuming operation thread, the state of the two-state semaphore includes signaled and non-signaled;

...

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 for cancelling time-consuming operation and blocking asynchronous conversion. The method comprises the following steps: creating a time-consuming operation thread; establishing a two-state semaphore for the time-consuming operation thread; enabling any thread to modify the two-state model quantity state into a signal so as to send a cancel request; and enabling the time-consuming operation thread to detect cancel by monitoring or querying a two-state semaphore state. Meanwhile, any blocking function can be converted into an asynchronous function or a UI blocking function for use. According to the method and system for cancelling time-consuming operation and blocking asynchronous conversion, the cancelling request and the blocking asynchronous conversion have business independence. The cancel request is sent to the thread executing the time-consuming operation only by using a uniform interface, and a special cancel interface does not need to be provided for different services, objects and operations. And the time-consuming operation can be realized only by providing a blocking interface instead of asynchronous and UI blocking interfaces.

Description

technical field [0001] The invention relates to thread processing technology, in particular to a method and system for canceling time-consuming operations and blocking asynchronous conversion. Background technique [0002] A large number of time-consuming operations are involved in the software, such as device IO, communication IO, and large calculations. These operations take a certain amount of time, and the completion time depends on factors such as system and network conditions, and has certain uncertainties. GUI SDK generally works in single-threaded mode, such as Windows GUI, Android GUI, QT GUI, etc. In a GUI App (graphical user interface application), the UI thread (the thread that processes the GUI) is responsible for monitoring and distributing UI messages (GUI messages), so that the GUI can accept user interface input. Therefore, the UI thread cannot directly perform time-consuming operations, otherwise the user's input will not be distributed and processed by t...

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/54
CPCG06F9/546G06F9/543
Inventor 肖华熙钱云潇
Owner 成都市奇点软件有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products