protected override void OnReceive(object message)
{
message.Match()
.With<Tuple<TestLatch, TestLatch>>(t =>
{
TestLatch busy = t.Item1, receivedLatch = t.Item2;
usedActors.TryAdd(0, Self.Path.ToString());
Self.Tell("another in busy mailbox");
receivedLatch.CountDown();
busy.Ready(TestLatch.DefaultTimeout);
})
.With<Tuple<int, TestLatch>>(t =>
{
var msg = t.Item1; var receivedLatch = t.Item2;
usedActors.TryAdd(msg, Self.Path.ToString());
receivedLatch.CountDown();
})
.With<string>(t => { });
}
}