using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace EQNetwork.Utility
{
    public class EQTask
    {
        Thread _thread;
        public EQTask(Action<EQTask> task)
        {
            _thread = new Thread(() =>
            {
                task(this);
            });
            _thread.Start();
        }

        public void Cancel()
        {
            _thread.Abort();
        }
    }
}
