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;...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: XING LONG, LI DAOSHUANG
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
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