I may be doing something incorrect, but it is not apparent. I have the following code:
namespace test
{
class Program
{
static void Main(string[] args)
{
using (var system = ActorSystem.Create("MySystem"))
{
var testPassRetriever = system.ActorOf<PrintActor>();
var task = testPassRetriever.Ask<PrintActorMsg>(new PrintActorMsg());
// prevent the application from exiting before message is handled
task.Wait();
Console.WriteLine("Finished.");
Console.ReadLine();
}
}
}
class PrintActorMsg{}
class PrintActor : ReceiveActor
{
public PrintActor()
{
Receive<PrintActorMsg>(msg => Console.WriteLine("foo"));
}
}
}// namespace test
The issue is that the Task returned by Ask never completes. Its status stays in the Waiting for Activation state. "Foo" does get printed on the command line so I know the actor is processing the Print message. Is there something else I am supposed to do in the overridden actor PrintMsg to mark the task completed?