Read-write balanced blocking queue implementation method and device
A technology for blocking queues and implementation methods, applied in the direction of multi-programming devices, etc., can solve the problems of increased investment in software economic costs, increased data synchronization security pressure, etc., to achieve the effect of removing risks, improving stability, and simplifying calling logic
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0035] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0036] An embodiment of the present invention provides a method for implementing a blocking queue for read-write balance, including the following steps:
[0037] A. see figure 1 As shown, add data to the synchronous blocking queue:
[0038] Step 101, the program adds N pieces of data to the synchronous blocking queue, where N is a positive integer;
[0039] Step 102, in the case of multi-threading, in order to ensure the integrity and correctness of the data, try to acquire the synchronization lock of the queue;
[0040] Step 103: After acquiring the synchronization lock of the queue, before adding data to the synchronous blocking queue, it is necessary to determine whether the synchronous blocking queue can add N pieces of data. If the queue exceeds the maximum setting range after adding N pieces of data, the program will run abnor...
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