Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:57
    Aaronontheweb closed #3877
  • 15:57
    Aaronontheweb commented #3877
  • 15:56

    Aaronontheweb on dev

    Persistence TestKit documentati… (compare)

  • 15:56
    Aaronontheweb closed #3889
  • 07:27
    dependabot-preview[bot] labeled #3999
  • 07:27

    dependabot-preview[bot] on nuget

    Bump FluentAssertions from 4.14… (compare)

  • 07:27
    dependabot-preview[bot] opened #3999
  • Oct 20 17:25
    valdisz synchronize #3889
  • Oct 20 17:17
    valdisz synchronize #3889
  • Oct 20 15:44
    valdisz synchronize #3889
  • Oct 20 09:22
    ismaelhamed commented #3863
  • Oct 19 23:39
    valdisz synchronize #3889
  • Oct 19 23:08
    edvinasz commented #2947
  • Oct 19 13:36
    Aaronontheweb commented #3973
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3995
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] edited #3995
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3993
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.9.1… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3991
Nicolas Bourbaki
@b0urb4k1
Ok but i guess you need to throw away determinism then.
Zetanova
@Zetanova
not realy
Nicolas Bourbaki
@b0urb4k1
Lets say you wanted to model something like a board game.
Then you need the sequence of actions of several of the actors.
Zetanova
@Zetanova
then the board can sync the steps or a child of board-actor
Nicolas Bourbaki
@b0urb4k1
Oh!
What is the name of the class i need to look up?
Zetanova
@Zetanova
?
ActorBase
most likly
Christian Duhard
@cduhard
If I send a RoundRobin router a PoisonPill.Instance i assume they all get the PoisonPill?
Christian Duhard
@cduhard
are there any examples on how to use GracefulStop correctly?
Aaron Stannard
@Aaronontheweb
@cduhard if you PoisonPill the router the router dies
and so do all of its routees
if it's a pool router
Christian Duhard
@cduhard
k it is
Aaron Stannard
@Aaronontheweb
for using GracefulStop
how that works by default is it PoisonPill's the target actor
Christian Duhard
@cduhard
@Aaronontheweb i am mostly not sure what to do with the Tasks if I have numerous children to stop
Aaron Stannard
@Aaronontheweb
and you the Task<bool> returns true if the temporary actor created by the GracefulStop call, kind of like the temporary actors created by Ask, gets a Terminated message
Christian Duhard
@cduhard
say for instance I have
Actor2.GracefulStop(TimeSpan.FromSeconds(10));
Actor3.GracefulStop(TimeSpan.FromSeconds(10), new Shutdown());
when all gracefulstop Tasks are complete I need to send a Passivate type message
i guess this is more about my shitty async skills than anythig
Christian Duhard
@cduhard
I assume sending a poisonPill just effects that actor and not it's watched children
Aaron Stannard
@Aaronontheweb
@alexvaluyskiy that's the goal
Christian Duhard
@cduhard
@Aaronontheweb so the bool returned from GracefulStop just tells me if the stop was actually graceful and didn't time out?
Aaron Stannard
@Aaronontheweb
bool == false if it timed out
didn't shut down in time
bool == true if it did
Christian Duhard
@cduhard
so its still running if it's false?
Aaron Stannard
@Aaronontheweb
and after we merge akkadotnet/akka.net#1765 all children will have been terminated also
like, guaranteed to have been stopped
correct
still running if false
when PoisonPill is sent, the actor must process all previous messages in its inbox first
before it can shut down
you can customize the shutdown message on GracefulStop too - there's an overload that supports that
so it can be something user-defined potentially
Christian Duhard
@cduhard
yeah, i've been using that
Aaron Stannard
@Aaronontheweb
just know that your message will also be user-defined, so it'll have the same behavior as PoisonPill in terms of processing order
if there's a big backlog of messages sitting in front of it
Christian Duhard
@cduhard
yep
Aaron Stannard
@Aaronontheweb
then the likelihood of a timeout will be higher
Christian Duhard
@cduhard
this graceful shutdown is a lot harder than I anticipated
Aaron Stannard
@Aaronontheweb
what's the issue exactly?
Christian Duhard
@cduhard
coordinating everything
Aaron Stannard
@Aaronontheweb
one pattern I've used
and we use this inside the Remoting class for doing a simultaneous shutdown of all transports at once
is I'll build a list of IActorRefs that need to be shutdown
call graceful stop on all of them and build a Task<bool> []