// Private methods private void ProcessPublish(Object o) { this.BlockWhileFrozen(); int sn; PublishDTO dto = o as PublishDTO; for (int i = 0; i < dto.NumEvents; i++) { lock (this) { sn = sequenceNumber++; logServer.LogAction("PubEvent " + name + ", " + name + ", " + dto.Topic + ", " + sn); brokerSite.Diffuse(new Event(this.name, this.siteName, dto.Topic, "content", sn)); } Thread.Sleep(dto.Interval); } }