source_block::accept_message Method

When overridden in a derived class, accepts an offered message by the source. Message blocks should override this method to validate the _MsgId and return a message.

virtual message<_Target_type> * accept_message(
   runtime_object_identity _MsgId
) = 0;


The runtime object identity of the message object.

A pointer to the message that the caller now has ownership of.

To transfer ownership, the original message pointer should be returned. To maintain ownership, a copy of message payload needs to be made and returned.

Header: agents.h

Namespace: concurrency

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft