private static (Store, AlchemistsQueue) InitializeDistribution() { var dispatcher = new Dispatcher(); var store = new Store(dispatcher); var queue = new AlchemistsQueue(dispatcher); var distributor = new Distributor(dispatcher, store, queue); new Thread(() => store.Run()).Start(); new Thread(() => queue.Run()).Start(); new Thread(() => distributor.Run()).Start(); return(store, queue); }
public Distributor(IDispatcher dispatcher, Store store, AlchemistsQueue queue) { this.dispatcher = dispatcher; this.store = store; this.queue = queue; }