private static void Main(string[] args)
        {
            FiberTask rootTask = new Task1();
            FiberTaskScheduler fiberTaskScheduler = new FiberTaskScheduler(rootTask);

            fiberTaskScheduler.Wait();
        }
        public void Start()
        {
            if (State == FiberTaskState.Unknown)
            {
                _scheduler = FiberTaskScheduler._scheduler;
            }

            State = FiberTaskState.Ready;
            _scheduler.StartTask(this);
        }
        public void Start()
        {
            if (State == FiberTaskState.Unknown)
            {
                _scheduler = FiberTaskScheduler._scheduler;
            }

            State = FiberTaskState.Ready;
            _scheduler.StartTask(this);
        }
        private void Scheduler(object data)
        {
            // schedule root task
            FiberTask rootTask = (FiberTask)data;

            _scheduler = this;

            _schedulerFiberId = FiberUnmanaged.ConvertThreadToFiber(0);

            rootTask.Start();
            SwitchTask();

            // exit
            FiberUnmanaged.ConvertFiberToThread();
        }
        private void Scheduler(object data)
        {
            // schedule root task
            FiberTask rootTask = (FiberTask)data;
            _scheduler = this;

            _schedulerFiberId = FiberUnmanaged.ConvertThreadToFiber(0);

            rootTask.Start();
            SwitchTask();

            // exit
            FiberUnmanaged.ConvertFiberToThread();
        }