Method and device for quickly loading configuration files with multiple threads
A configuration file and multi-threading technology, applied in the field of network communication, can solve problems such as insufficient utilization of system resources, achieve the effect of improving startup speed and system resource utilization, and shortening time
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0023] The present invention provides a method for multi-threaded fast loading of configuration files, such as figure 1 As shown, the method includes:
[0024] S1: Initialize the configuration delivery queue and the end mark; the end mark is the process of marking the parsing configuration file, and the end mark is 1 when the parsing configuration file ends;
[0025] After the end mark is initialized, the end mark M=0; in the process of parsing the configuration file, the end mark M is always 0, and when the configuration file is completely parsed, the end mark M=1.
[0026] S2: Analyze the configuration file item by item, and save the delivered data obtained through analysis into the configuration delivery queue;
[0027] Before parsing the configuration file one by one, read the entire configuration file and save the configuration file to the cache. The command parsing thread parses configuration files one by one from the cache, enqueues the parsed data as a whole, and put...
Embodiment 2
[0032] The present invention also provides a device for quickly loading configuration files with multiple threads, such as figure 2 As shown, the device includes:
[0033] The initialization module 101 is used to initialize the configuration delivery queue and the end mark; the end mark is the process of marking the parsing configuration file, and the end mark is 1 when the parsing configuration file ends;
[0034] The command parsing thread 102 is used for parsing the configuration file one by one, and saving the sent data obtained by parsing into the configuration sending queue;
[0035] At least one command delivery thread 103 is used to obtain the delivery data stored in the configuration delivery queue by means of a lock, and generate system usage data from the acquired delivery data. When the configuration delivery queue is empty, And the end mark is 1, then the system loading configuration is completed.
[0036] The device also includes:
[0037] The startup module ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com