JoinedReceive(T0, T1) Method

Microsoft Robotics Class Reference

Creates a join receiver arbiter that waits for two messages to arrive on two ports, in any order

Namespace: Microsoft.Ccr.Core
Assembly: Microsoft.Ccr.Core (in Microsoft.Ccr.Core.dll) Version: 4.0.261.0 (4.0.261.0)

Syntax

public static JoinReceiver JoinedReceive<T0, T1>(
    bool persist,
    Port<T0> port0,
    Port<T1> port1,
    Handler<T0, T1> handler
)

Parameters

Type Parameters

  • T0
    Message type
  • T1
    Message type

Return Value

Instance of JointReceiver arbiter

Remarks

Joined receives perform a two phase protocol to extracting, one at a time, items for the ports in the join. This guarantees that if two different joins, that are listening on one or more shared port, can continue to make progress without starvation. However it has significant performance implications if there is alot of contention on these ports. MultipleItemReceive methods are recommended for cases where consuming the items on a port directly is not an issue and scatter/gather is the main goal.

See Also

Arbiter Class

Microsoft.Ccr.Core Namespace