public void OnMessage(Msg msg) { if (msg is MQueryExecute) { _enclosing.processingMessage = true; barrier.Add(new object()); Runtime4.Sleep(500); _enclosing.processingMessage = false; } else { if (msg is MIsAlive) { Assert.IsFalse(_enclosing.processingMessage); } } }
public virtual void Add(object obj) { queue.Add(obj); }