:orphan: .. index:: pair: struct; msg_queue .. _doxid-structmsg__queue: struct msg_queue ================ .. toctree:: :hidden: Overview ~~~~~~~~ Thread safe message queue for communication between Logger threads and listener server thread. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct msg_queue { // fields refcnt_buffer_list :ref:`items`; bool :ref:`shutdown`; pthread_mutex_t :ref:`mutex`; int :ref:`eventfd`; GQueue* :ref:`queue`; GList* :ref:`cache`; bool :ref:`offloaded`; uint32_t :ref:`offload_ts`[2]; }; .. _details-structmsg__queue: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Thread safe message queue for communication between Logger threads and listener server thread. Structure storing a queue of regular log message pointers. Fields ------ .. index:: pair: variable; items .. _doxid-structmsg__queue_1a73c4084674fc2eb0d8c0d6f13688fa93: .. ref-code-block:: cpp :class: doxyrest-title-code-block refcnt_buffer_list items Messages .. index:: pair: variable; shutdown .. _doxid-structmsg__queue_1afc6e1fb1600a4d28ebcfe9b96d52032c: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool shutdown Whether the queue is being shutdown .. index:: pair: variable; mutex .. _doxid-structmsg__queue_1a5218b92f916543130a579ecf1523ad82: .. ref-code-block:: cpp :class: doxyrest-title-code-block pthread_mutex_t mutex Mutex for consumer-producer synchronization .. index:: pair: variable; eventfd .. _doxid-structmsg__queue_1ae6d260f0068d9615926f5d8dc70a3351: .. ref-code-block:: cpp :class: doxyrest-title-code-block int eventfd File descriptor for consumer to poll on .. index:: pair: variable; queue .. _doxid-structmsg__queue_1a6c74ce69fee39f117170ef98b9021225: .. ref-code-block:: cpp :class: doxyrest-title-code-block GQueue* queue Queue of message pointers stored in memory .. index:: pair: variable; cache .. _doxid-structmsg__queue_1a9be1c6de86f310f61740197daac0f1eb: .. ref-code-block:: cpp :class: doxyrest-title-code-block GList* cache A slot in queue after which the next message pointer could be added with high probability .. index:: pair: variable; offloaded .. _doxid-structmsg__queue_1ae7826f53afb87d94a1b045cecfa6928d: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool offloaded Whether some message pointers are offloaded to a file .. index:: pair: variable; offload_ts .. _doxid-structmsg__queue_1abd995c5b2a8c0fb2aa5220c4da89f4f5: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint32_t offload_ts[2] Timestamp of the most recent message pointer offloaded to a file