private TaskQueue(string name, ApartmentState?apartmentState, ILogger logger, IThreadChanger threadChanger) { Logger = logger; ThreadChanger = threadChanger; _worker = new Thread(Work) { IsBackground = true, Name = _threadName + name }; if (apartmentState.HasValue) { _worker.SetApartmentState(apartmentState.Value); } _worker.Start(); }
public TaskQueueFactory(ILogger logger, IThreadChanger threadChanger) { Logger = logger; ThreadChanger = threadChanger; }
public TaskQueue(string name, ApartmentState apartmentState, ILogger logger, IThreadChanger threadChanger) : this(name, new ApartmentState?(apartmentState), logger, threadChanger) { }
public TaskQueue(string name, ILogger logger, IThreadChanger threadChanger) : this(name, null, logger, threadChanger) { }