Method for realizing lock-free queue of single producer and single consumer
The invention discloses a single producer and single consumer lock-free queue realization method, which relates to the technical field of data processing, and comprises the following steps: S1, initializing queue information; s2, putting the data into a queue; s3, taking out the data from the queue;...
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a single producer and single consumer lock-free queue realization method, which relates to the technical field of data processing, and comprises the following steps: S1, initializing queue information; s2, putting the data into a queue; s3, taking out the data from the queue; and S4, sending the report information to the exchange. According to the implementation method of the single producer and single consumer lock-free queue and the implementation of the universal lock-free queue, delay and jitter are reduced for a standard library, delay is reduced and jitter is improved for queue implementation of a traditional open source library and the universal lock-free queue, addresses in the queues are operated in both storage and extraction operations, and therefore the storage efficiency of the queues is improved. According to the technical scheme, the method has the advantages that additional copying caused by value operation is eliminated, the situation that delay is greatly increased du |
---|