public void ExecuteStep()
{
if (this.MustStart)
{
this.MustStart = false;
Thread.Name = "Coroutine-" + Name;
Thread.Start();
}
//Debug.WriteLine("ExecuteStep");
if (IsAlive)
{
Pool.CurrentCoroutine = this;
Pool.CallerThread = Thread.CurrentThread;
Pool.CallerContinueEvent.Reset();
CoroutineContinueEvent.Set();
PoolCallerContinueEvent_WaitOne();
}
if (RethrowException != null)
{
try
{
//StackTraceUtils.PreserveStackTrace(RethrowException);
throw (new GreenThreadException("GreenThread Exception", RethrowException));
//throw (RethrowException);
}
finally
{
RethrowException = null;
}
}
}