Restioson/xtra

Move `Context::stop_all` to `Address`

thomaseizinger opened this issue · 1 comments

A Context is usually not available other than from within an actor's Handler and thus, this feature cannot be used from all places.

I'd claim that most likely, a piece of code shutting down all instances of a set of actors will be outside those actors and thus, would likely want to do this from the Address. An Address can still be acquired from a Context so this can still be used from within a Handler.

Additionally, to make progress on #91, we need to remove as many APIs from Context as possible and this one is using the sender which is already embedded in an Address so it is easy to port.

We agreed that this fits better onto Context! See linked PRs for discussion :)