다음을 통해 공유


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;

Parameters

  • _MsgId
    The runtime object identity of the message object.

Return Value

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

Remarks

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

Requirements

Header: agents.h

Namespace: concurrency

See Also

Reference

source_block Class