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

Thread pool managing method and system

A management method and thread pool technology, applied in the field of thread pool management methods and management systems, can solve problems such as threads that cannot be accurately detected in a timely manner

Active Publication Date: 2014-04-23
SHENZHEN LAN YOU TECH
View PDF6 Cites 22 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The present invention is aimed at the defect that in the existing thread pool management technology, it is necessary to mobilize the thread pool interface adapted to the platform under different platforms to realize the scheduling of threads, and it is impossible to timely and accurately detect the thread of suspended animation, the thread of suspended animation Defects that require users to judge by themselves, provide a thread pool management method and management system, and provide a unified thread pool interface suitable for various platforms, which can promptly and accurately determine the thread of suspended animation, and notify the user of the corresponding error location

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 pool managing method and system
  • Thread pool managing method and system
  • Thread pool managing method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0057] The present invention will be further explained below in conjunction with the accompanying drawings and embodiments.

[0058] figure 2 It is a flow chart of the first embodiment of the thread pool management method of the present invention, such as figure 2 As shown, in this embodiment, the thread pool management method includes the following steps:

[0059] S1. Create a worker thread and send the worker thread to the thread pool queue;

[0060] S2, creating a detection thread;

[0061] S3. Call the worker thread in the thread pool queue to execute the task;

[0062] S4, detect whether the heartbeat signal of each working thread is received in the heartbeat cycle by detecting the thread;

[0063] S5. Setting the worker thread that has not received the heartbeat signal within the heartbeat cycle to a state of suspended animation through the detection thread, releasing all its resources, and notifying the user of the error location through the user interface.

[00...

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 pool managing method and system. The system comprises a working thread creating unit, a detecting thread creating unit, a working thread calling unit, a heartbeat signal detecting unit and a zombie thread processing unit. The managing method includes: creating a working thread, and delivering the same into a thread pool queue; creating a detecting thread; calling the working thread in the thread pool queue to execute a task; using the detecting thread to detect whether the heartbeat signals of each working thread is received or not in a heartbeat cycle; using the detecting thread to set the working threads whose heartbeat signals are not received in the heartbeat cycle as zombie threads, releasing all the resources of the zombie threads, and notifying a user of the fault positions through a user interface. The method and system has the advantages that the working threads in the thread pool are managed through the thread pool, dependence on operating system management is avoided, zombie threads can be detected timely and accurately, and the fault positions in programs using the zombie threads to execute tasks can be found and notified to the user.

Description

technical field [0001] The present invention relates to thread pool technology, and more specifically, relates to a thread pool management method and management system. Background technique [0002] In an application based on object-oriented programming, it takes a lot of time to create and destroy objects because creating an object requires memory resources or other more resources. Taking an application based on Java programming technology as an example, the JVM (Java Virtual Machine) will try to track each object so that system resources can be recovered after the object is destroyed. [0003] In addition, in addition to the overhead of creating and destroying threads, active threads also consume system resources. If a large number of threads are generated in a short period of time, the system may run out of resources due to excessive memory consumption or excessive switching. In order to prevent insufficient resources, server applications need some way to limit the numb...

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/46G06F9/50
Inventor 肖洪锦
Owner SHENZHEN LAN YOU TECH
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