private ActorBase NewActor()
{
PrepareForNewActor();
ActorBase instance=null;
//set the thread static context or things will break
UseThreadContext(() =>
{
_state = _state.ClearBehaviorStack();
instance = CreateNewActorInstance();
//TODO: this overwrites any already initialized supervisor strategy
//We should investigate what we can do to handle this better
instance.SupervisorStrategyInternal = _props.SupervisorStrategy;
//defaults to null - won't affect lazy instantiation unless explicitly set in props
});
return instance;
}