| description | Learn more about: message_processor Class | ||||||
|---|---|---|---|---|---|---|---|
| title | message_processor Class | ||||||
| ms.date | 11/04/2016 | ||||||
| f1_keywords |
|
||||||
| helpviewer_keywords |
|
||||||
| ms.assetid | 23afb052-daa7-44ed-bf24-d2513db748da |
The message_processor class is the abstract base class for processing of message objects. There is no guarantee on the ordering of the messages.
template<class T>
class message_processor;T
The data type of the payload within messages handled by this message_processor object.
| Name | Description |
|---|---|
type |
A type alias for T. |
| Name | Description |
|---|---|
| async_send | When overridden in a derived class, places messages into the block asynchronously. |
| sync_send | When overridden in a derived class, places messages into the block synchronously. |
| wait | When overridden in a derived class, waits for all asynchronous operations to complete. |
| Name | Description |
|---|---|
| process_incoming_message | When overridden in a derived class, performs the forward processing of messages into the block. Called once every time a new message is added and the queue is found to be empty. |
message_processor
Header: agents.h
Namespace: concurrency
When overridden in a derived class, places messages into the block asynchronously.
virtual void async_send(_Inout_opt_ message<T>* _Msg) = 0;_Msg
A message object to send asynchronously.
Processor implementations should override this method.
When overridden in a derived class, performs the forward processing of messages into the block. Called once every time a new message is added and the queue is found to be empty.
virtual void process_incoming_message() = 0;Message block implementations should override this method.
When overridden in a derived class, places messages into the block synchronously.
virtual void sync_send(_Inout_opt_ message<T>* _Msg) = 0;_Msg
A message object to send synchronously.
Processor implementations should override this method.
When overridden in a derived class, waits for all asynchronous operations to complete.
virtual void wait() = 0;Processor implementations should override this method.