public bool MoveNext()
        {
            // yield once, exposing the yield instruction to the caller.
            if (!yielded)
            {
                Log("yielding first time");
                yielded = true;
                return(true);
            }

            // syncronization context called again, therefore the yield instruction
            // must have completed. we now continue on the original context.
            Log("yielded. continuing on original context.");
            coroutineWrapper.ContinueOn(originalContext);

            // also our work is complete -> return to pool
            Return(this);
            return(false);
        }
 private void ResumeCoroutine()
 {
     // resume coroutine on its original synchronization context
     coroutineWrapper.ContinueOn(originalContext);
 }