public Exchange(IOrderMatchingStrategy matchingStrategy, IOrderQueue orderQueue, IOrderQueue tempOrderQueue, int id, string code, string name, bool asyncMatching, bool strictQueueingOrder) { _matchingStrategy = matchingStrategy; _orderQueue = orderQueue; _tempOrderQueue = tempOrderQueue; Id = id; Code = code; Name = name; _strictQueueingOrder = strictQueueingOrder; _asyncMatching = asyncMatching; if (asyncMatching) { _matchingThreadStarted = new ManualResetEvent(false); _matchingThread = new Thread(MatchingThread); _matchingThread.IsBackground = true; _matchingThread.Start(); _matchingThreadStarted.WaitOne(); } }
public Exchange(IOrderMatchingStrategy matchingStrategy, IOrderQueue orderQueue, IOrderQueue tempOrderQueue, int id, string code, string name, bool asyncMatching) : this(matchingStrategy, orderQueue, tempOrderQueue, id, code, name, asyncMatching, true) { }