These are chat archives for akkadotnet/akka.net

23rd
Aug 2015
Ryan Davis
@rdavisau
Aug 23 2015 08:47
@rogeralsing sure - I was out and about this weekend but did see your tweet - will run through some scenarios with it tomorrow!
btw well done, the performance results are impressive :+1:
Hyungho Ko
@hhko
Aug 23 2015 11:13
ActorSystem.Shutdown() method is processing asynchronous. If a actor is processing, Is ActorSystem waiting until it is completed?
blob
class FooActor : UntypedActor
{
public FooActor()
{
Console.WriteLine("FooActor: ConstructorB");
}
    protected override void PreStart()
    {
        base.PreStart();
        Console.WriteLine("FooActor: PreStart");
    }

    protected override void PostStop()
    {
        base.PostStop();
        Console.WriteLine("FooActor: PostStop");
    }

    protected override void OnReceive(object message)
    {
        string number = (string)message;
        Console.WriteLine("FooActor: OnReceiving:\t {0}", number);
        Thread.Sleep(2000);
        Console.WriteLine("FooActor: OnReceived:\t {0}", number);
    }
}

class Program
{
    static void Main(string[] args)
    {
        using (ActorSystem system = ActorSystem.Create("BLUE"))
        {
            IActorRef fooActor = system.ActorOf(Props.Create(() => new FooActor()), "FooActor");

            fooActor.Tell("1");
            fooActor.Tell("2");

            Thread.Sleep(100);
            //system.Stop(fooActor);
            system.Shutdown();
            //fooActor.Tell(PoisonPill.Instance);

            system.AwaitTermination();
            Console.WriteLine("Shutdon Completed");
            Console.ReadLine();
        }

        Console.ReadLine();
    }
}
Hyungho Ko
@hhko
Aug 23 2015 11:20
how to wait for all of actors are completed?
Suhas Chatekar
@schatekar
Aug 23 2015 17:39
@Aaronontheweb I am still struggling to debug the multi node tests
Sometimes the tests run but no breakpoint is hit. other times visual studio just freezes
which version of visual studio do you use?
Hyungho Ko
@hhko
Aug 23 2015 23:16
i am using visual studio 2015 and akka.net 1.0.4
i think shutdown method have to wait for all of actors completed.
is it bug?