![]()  | 
  
    MySQL 9.5.0
    
   Source Code Documentation 
   | 
 
MPSC queue with FIFO semantics used to send commands to XCom. More...
#include <gcs_xcom_input_queue.h>
Classes | |
| class | Reply | 
| Wraps XCom's reply to a queued request.  More... | |
Public Types | |
| using | future_reply = std::future< std::unique_ptr< Reply > > | 
Public Member Functions | |
| Gcs_xcom_input_queue_impl () noexcept | |
| ~Gcs_xcom_input_queue_impl () | |
| Gcs_xcom_input_queue_impl (Gcs_xcom_input_queue_impl const &)=delete | |
| Gcs_xcom_input_queue_impl (Gcs_xcom_input_queue_impl &&)=delete | |
| Gcs_xcom_input_queue_impl & | operator= (Gcs_xcom_input_queue_impl const &)=delete | 
| Gcs_xcom_input_queue_impl & | operator= (Gcs_xcom_input_queue_impl &&)=delete | 
| bool | push (app_data_ptr msg) | 
Sends the command msg to XCom.  More... | |
| future_reply | push_and_get_reply (app_data_ptr msg) | 
Sends the command msg to XCom.  More... | |
| xcom_input_request_ptr | pop () | 
| Attempts to retrieve all the queued app_data_ptr in one swoop.  More... | |
| void | reset () | 
| Empties the queue.  More... | |
Private Member Functions | |
| Reply * | push_internal (app_data_ptr msg, xcom_input_reply_function_ptr reply_function) | 
Internal helper to implement push and @ push_and_get_reply.  More... | |
Private Attributes | |
| Queue | m_queue | 
MPSC queue with FIFO semantics used to send commands to XCom.
| using Gcs_xcom_input_queue_impl< Queue >::future_reply = std::future<std::unique_ptr<Reply> > | 
      
  | 
  inlinenoexcept | 
      
  | 
  inline | 
      
  | 
  delete | 
      
  | 
  delete | 
      
  | 
  delete | 
      
  | 
  delete | 
      
  | 
  inline | 
Attempts to retrieve all the queued app_data_ptr in one swoop.
Transfers ownership of the returned pointer(s). Note that this method is non-blocking.
| app_data_ptr | linked list of the queued commands if the queue is not empty | 
| nullptr | if the queue is empty | 
      
  | 
  inline | 
Sends the command msg to XCom. 
This method has fire-and-forget semantics, i.e. we do not wait or have access to any potential reply from XCom. Takes ownership of msg.
| msg | the app_data_ptr to send to XCom | 
| false | if there is no memory available | 
| true | otherwise (operation was successful) | 
      
  | 
  inline | 
Sends the command msg to XCom. 
This method has request-response semantics, i.e. we get back a future on which we must wait for XCom's reply. Please note that you must retrieve the future's value, otherwise it will leak. If you do not care for a reply, use push instead. Takes ownership of msg.
| msg | the app_data_ptr to send to XCom | 
      
  | 
  inlineprivate | 
Internal helper to implement push and @ push_and_get_reply. 
Creates and pushes a request to XCom with the payload msg and using the reply strategy reply_function.
| msg | the request's payload | 
| reply_function | the reply strategy for this request | 
| Reply* | if successful | 
| nullptr | if unsuccessful | 
      
  | 
  inline | 
Empties the queue.
      
  | 
  private |