コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Distributor.cs プロジェクト: bselwe/alchemy
 public Distributor(IDispatcher dispatcher, Store store, AlchemistsQueue queue)
 {
     this.dispatcher = dispatcher;
     this.store      = store;
     this.queue      = queue;
 }