Exemplo n.º 1
0
        private void ReturnImmediately()
        {
            _stateMachine = default(TStateMachine);
            TaskValueSourcePool <StateMachineBox <TStateMachine> > .Return(this);

            Diagnostics.Trace.TraceReturn(this);
        }
Exemplo n.º 2
0
        public static StateMachineBox <TStateMachine> Allocate(ref TStateMachine stateMachine)
        {
            var box = TaskValueSourcePool <StateMachineBox <TStateMachine> > .Allocate();

            box._stateMachine = stateMachine;
            Diagnostics.Trace.TraceAllocation(box);
            return(box);
        }