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

Multi-thread creation system and method, and multi-thread processing system and method

A multi-threading and threading technology, applied in the computer field, can solve the problems of laborious programming and waiting for the main thread, and achieve the effect of improving flow, improving stability and improving user experience.

Active Publication Date: 2017-05-24
桂林远望智能通信科技有限公司
View PDF10 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, if multi-threading is used, there will be a lot of critical sections (basically, the application programming interface of the form belongs to the critical section), which will also make programming very laborious.
Furthermore, if the thread has multiple sub-threads, when the form needs to be released, it must wait for the sub-thread to end before releasing the form, which also causes the main thread to wait, and then pops up the "program not responding" system prompt, so it is necessary to solve these problems

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
  • Multi-thread creation system and method, and multi-thread processing system and method
  • Multi-thread creation system and method, and multi-thread processing system and method
  • Multi-thread creation system and method, and multi-thread processing system and method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 2

[0060] Such as figure 1 As shown, a multi-thread processing system includes a multi-thread creation system and a first thread message queue, a second thread message queue, a main thread, and a sub-thread created by the multi-thread creation system;

[0061] The interface module 1 is used to receive external operation instructions and transmit them to the window object module 2; also used to transmit the first processing result to the outside for display; and also used to transmit the second processing result to the outside for display;

[0062] The window object module 2 is used to judge the tasks required to be executed by the operation instructions. When it is judged that the tasks to be executed need to be processed in a thread, the corresponding main thread is extracted and transmitted to the thread message queue module 3, and the first processing result is generated Return to interface module 1;

[0063] The thread message queue module 3 is used to put the main thread into the f...

Embodiment 3

[0076] Such as figure 2 As shown, a multi-thread creation method includes the following steps:

[0077] Step A1. Receive an external form object instruction, generate a form object according to the form object instruction, and respectively generate a first thread message queue instruction, a second thread message queue instruction, a main thread instruction and a child thread creation instruction;

[0078] Step A2. Create the first thread message queue and the second thread message queue respectively according to the create first thread message queue instruction and create the second thread message queue instruction, and return the first creation success message; according to the create main thread instruction and create child threads The instruction creates the main thread and the child thread respectively, and returns the second creation success message;

[0079] Step A3. Output the form object according to the first creation success message and the second creation success message...

Embodiment 4

[0083] Such as image 3 As shown, a multi-threaded processing method includes the following steps:

[0084] Step B1. Receive an external operation instruction, judge the task required by the operation instruction, and when it is judged that the task to be executed needs to be processed in a thread, extract the corresponding main thread and transmit it to the first thread message queue, and generate the first processing result Transmit to the outside for display;

[0085] Step B2. Put the main thread into the first thread message queue for saving and sorting;

[0086] Step B3. Read the main thread in the message queue of the first thread, process through the main thread, call resources to perform the corresponding task, and return the second processing result when the task is completed and transmit it to the outside for display; after the task is completed, the main thread call is also cleared Get the resource and clear the window object.

[0087] Can make the main thread save the or...

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 relates to a multi-thread creation system and method, and a multi-thread processing system and method. The multi-thread creation system comprises an interface module for receiving an external window object instruction, transmitting the external window object instruction to a window object module and transmitting a window object to outside for performing display, the window object module for generating the window object, generating a first thread message queue creation instruction, a second thread message queue creation instruction, a main thread creation instruction and a sub-thread creation instruction and outputting the window object to the interface module, a thread message queue module for creating a first thread message queue and a second thread message queue and returning a first creation success message to the window object module, and a thread processing module for creating a main thread and sub-threads and returning a second creation success message to the window object module. Compared with the prior art, the multi-thread creation system and method, and the multi-thread processing system and method have the advantages that critical regions can be reduced, a program process can be improved, user experience can be improved, thread processing can be standardized, and system stability can be ensured.

Description

Technical field [0001] The invention relates to the field of computer technology, in particular to a multi-thread creation system and method, and a multi-thread processing system and method. Background technique [0002] In the prior art form, a message queue is used instead of multiple threads, which is for the scalability of the program. We write code according to its framework, which can achieve convenient and fast development, but it also makes many application programming interfaces not thread-safe, and even some functions do not support the use of non-form main threads; but in all programs, All may need to be executed in parallel. If they are not executed in parallel and are executed in the main thread of the form, it is possible to wait, and waiting in the main form of the program will make the program gray, and then a system prompt of "program not responding" will pop up. Only after this waiting is over can the program resume. However, if you use multi-threading, there...

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/48G06F9/50
CPCG06F9/4881G06F9/5038
Inventor 蔡晓东刘剑
Owner 桂林远望智能通信科技有限公司
Features
  • Generate Ideas
  • 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