Akka.Actor.ActorCell.UseThreadContext C# (CSharp) Méthode

UseThreadContext() public méthode

public UseThreadContext ( Action action ) : void
action Action
Résultat void
        public void UseThreadContext(Action action)
        {
            var tmp = InternalCurrentActorCellKeeper.Current;
            InternalCurrentActorCellKeeper.Current = this;
            try
            {
                action();
            }
            finally
            {
                //ensure we set back the old context
                InternalCurrentActorCellKeeper.Current = tmp;
            }
        }