C# 클래스 Akka.Actor.GracefulStopSupport

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. IMPORTANT: 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 completed 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 => { // Do something after someChild starts being stopped. });
파일 보기 프로젝트 열기: rogeralsing/akka.net

공개 메소드들

메소드 설명
GracefulStop ( this target, System.TimeSpan timeout ) : Task
GracefulStop ( this target, System.TimeSpan timeout, object stopMessage ) : Task

메소드 상세

GracefulStop() 공개 정적인 메소드

public static GracefulStop ( this target, System.TimeSpan timeout ) : Task
target this
timeout System.TimeSpan
리턴 Task

GracefulStop() 공개 정적인 메소드

public static GracefulStop ( this target, System.TimeSpan timeout, object stopMessage ) : Task
target this
timeout System.TimeSpan
stopMessage object
리턴 Task