ISourceBlock.ReserveMessage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called by a linked ITargetBlock
public:
bool ReserveMessage(System::Threading::Tasks::Dataflow::DataflowMessageHeader messageHeader, System::Threading::Tasks::Dataflow::ITargetBlock ^ target);
public bool ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target);
abstract member ReserveMessage : System.Threading.Tasks.Dataflow.DataflowMessageHeader * System.Threading.Tasks.Dataflow.ITargetBlock<'Output> -> bool
Public Function ReserveMessage (messageHeader As DataflowMessageHeader, target As ITargetBlock(Of Out TOutput)) As Boolean
Parameters
- messageHeader
- DataflowMessageHeader
The DataflowMessageHeader of the message being reserved.
- target
-
ITargetBlock
The ITargetBlock
Returns
true if the message was successfully reserved; otherwise, false.
Exceptions
The messageHeader is not valid.
The target is null.
Remarks
Only ITargetBlock
If true is returned, the ITargetBlock
ReserveMessage must not be called while the target is holding any internal locks. Doing so will violate the lock hierarchy necessary to avoid deadlocks in a dataflow network.