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

Thread exit method, device and equipment and readable storage medium

A thread and thread group technology, applied in the computer field, can solve problems such as the inability to meet the conditions for thread to be awakened, the inability to execute the thread exit command, and the inability to exit according to the thread exit command.

Pending Publication Date: 2020-01-21
浙江诺诺网络科技有限公司
View PDF5 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In this case, thread B can exit directly according to the thread exit command, but thread A cannot exit according to the thread exit command because it enters the dormant state, so A cannot exit
[0004] It should be noted that the thread is in a dormant state after running and reaching the barrier, so the thread exit command cannot be executed
And because the thread that has not reached the barrier has exited according to the thread exit command, the condition for the thread to be awakened cannot be satisfied, so the A thread has been in a dormant state, resulting in a deadlock

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 exit method, device and equipment and readable storage medium
  • Thread exit method, device and equipment and readable storage medium
  • Thread exit method, device and equipment and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0045] At present, in the process of coordinating the synchronous execution of multiple threads by the barrier, some threads will exit when a thread exit command is received, while some threads will generate a deadlock, causing the threads to fail to exit synchronously. For this reason, the present application provides a thread exit solution, which can realize the synchronous exit of all threads and avoid the occurrence of deadlock.

[0046] see figure 1 As shown, the embodiment of...

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 exit method, device and equipment and a readable storage medium. The method comprises the following steps: receiving a thread exit command; determining a first threadreaching the first barrier and a second thread not reaching the first barrier; when the second thread exits, blocking the second thread by utilizing a second barrier so as to wake up the first threadand the second thread; and controlling the awakened first thread and second thread to exit synchronously according to the thread exit command. According to the method, the second barrier is set in theexit process of the second thread. After the thread exit command is received, the second thread can meet the second barrier during exit, and at the moment, the first thread and the second thread bothreach the barrier, so that the first thread and the second thread can be awakened and exit according to the thread exit command, synchronous exit of the threads is realized, and deadlock is avoided.Correspondingly, the invention also discloses a thread exit device and equipment and a readable storage medium, which also have the above technical effects.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a thread exit method, device, equipment and readable storage medium. Background technique [0002] In the prior art, a barrier is generally used to coordinate the synchronous execution of multiple threads. Specifically: when the thread reaches the barrier, it will be in a dormant state to wait for other threads; after other threads have reached the barrier, all threads that have reached the barrier will be awakened, so that the next processing flow can be executed. [0003] However, barriers introduce another problem in the process of coordinating the simultaneous execution of multiple threads. Assuming that there are two threads (A and B) executing synchronously, currently only the A thread is running to reach the barrier, but the B thread has not yet reached the barrier, and the thread exit command is received at this time. In this case, thread B can exit directly...

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/4401G06F9/52
CPCG06F9/524G06F9/4418Y02D10/00
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