为什么在运行此控制台应用程序时会收到 DeathWatchNotification:
class Program
{
private static ActorSystem TestSystem;
static void Main(string[] args)
{
TestSystem = ActorSystem.Create("TestSystem");
TestSystem.ActorOf<TestActor>("Test");
Console.WriteLine("Press a key to shutdown actor system");
Console.ReadKey();
TestSystem.Shutdown();
TestSystem.AwaitTermination();
Console.WriteLine("Press a key to quit");
Console.ReadKey();
}
}
public class TestActor : ReceiveActor
{
public TestActor()
{
}
protected override void Unhandled(object message)
{
Console.WriteLine("unhandled message");
//Do something with the message.
}
}
public class TestMessage
{
}
显然我没有发送任何消息,演员也没有做任何事情。这不是什么大不了的事,但我担心如果我忽略此消息,我会错过一个真正的问题。