GracefulStopSupport Class |
Returns a
Task that will be completed with success when existing messages
of the target actor have been processed and the actor has been terminated.
Useful when you need to wait for termination or compose ordered termination of several actors,
which should only be done outside of the
ActorSystem as blocking inside
ActorBase is discouraged.
RemarksIMPORTANT: the actor being terminated and its supervisor being informed of the availability of the deceased actor's name
are two distinct operations, which do not obey any reliable ordering.
If the target actor isn't terminated within the timeout the
Task is complted with failure.
If you want to invoke specialized stopping logic on your target actor instead of
PoisonPill, you can pass your stop command as a parameter:
GracefulStop(someChild, timeout, MyStopGracefullyMessage).ContinueWith(r => {
});
Inheritance Hierarchy
Namespace: Akka.ActorAssembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntaxpublic static class GracefulStopSupport
<ExtensionAttribute>
Public NotInheritable Class GracefulStopSupport
[ExtensionAttribute]
public ref class GracefulStopSupport abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type GracefulStopSupport = class end
Methods
See Also