Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- persist
Type: System. . :: . .Boolean
True if receiver can stay registered with the port after the first message
- port0
Type: Microsoft.Ccr.Core. . :: . .Port< (Of < ( <'T0> ) > ) >
Port instance for message type T0
- port1
Type: Microsoft.Ccr.Core. . :: . .Port< (Of < ( <'T1> ) > ) >
Port instance for message type T1
- handler
Type: Microsoft.Ccr.Core. . :: . .Handler< (Of < ( <'T0, T1> ) > ) >
User delegate that will execute when the join is satisfied
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.