func (s *ExternalAgent) Release() {
	s.ManagedThread.Release()
}
Release will resume a suspended thread
package core
import (
	"fmt"
	"time"
	"go.amzn.com/lambda/core/statejson"
	"github.com/google/uuid"
)
type ExternalAgent struct {
	Name   string
	ID     uuid.UUID
	events map[Event]struct{}
	ManagedThread Suspendable
	currentState      ExternalAgentState
	stateLastModified time.Time
	Pid               int
	StartedState        ExternalAgentState
	RegisteredState     ExternalAgentState
	ReadyState          ExternalAgentState
	RunningState        ExternalAgentState
	InitErrorState      ExternalAgentState
	ExitErrorState      ExternalAgentState
	ShutdownFailedState ExternalAgentState
	ExitedState         ExternalAgentState
	LaunchErrorState    ExternalAgentState
	errorType string
}
func NewExternalAgent(name string, initFlow InitFlowSynchronization, invokeFlow InvokeFlowSynchronization) *ExternalAgent {
	agent := &ExternalAgent{
		Name:          name,
		ID:            uuid.New(),
		ManagedThread: NewManagedThread(),
		events:        make(map[Event]struct{}),
	}
	agent.StartedState = &ExternalAgentStartedState{agent: agent, initFlow: initFlow}
	agent.RegisteredState = &ExternalAgentRegisteredState{agent: agent, initFlow: initFlow}
	agent.ReadyState = &ExternalAgentReadyState{agent: agent}
	agent.RunningState = &ExternalAgentRunningState{agent: agent, invokeFlow: invokeFlow}
	agent.InitErrorState = &ExternalAgentInitErrorState{}
	agent.ExitErrorState = &ExternalAgentExitErrorState{}
	agent.ShutdownFailedState = &ExternalAgentShutdownFailedState{}
	agent.ExitedState = &ExternalAgentExitedState{}
	agent.LaunchErrorState = &ExternalAgentLaunchErrorState{}
	agent.setStateUnsafe(agent.StartedState)
	return agent
}
func (s *ExternalAgent) String() string {
	return fmt.Sprintf("%s (%s)", s.Name, s.ID)
}
func (s *ExternalAgent) SuspendUnsafe() {
	s.ManagedThread.SuspendUnsafe()
}