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

namespace Villain.Threading
{
	public abstract class QueueWorker
	{
		protected readonly ConcurrentQueue<object> _queue = new ConcurrentQueue<object>();
		protected readonly Thread _thread;

		public QueueWorker()
		{
			_thread = new Thread(Work);
		}

		public virtual void Start()
		{
			_thread.Start();
		}

		protected abstract void Work();
	}
}