public override void SetEventTopic(string eventKey, Topic topic) { lock (_lockObj) { // O(n), but small n and it's not common var index = _cursors.FindIndex(c => c.Key == eventKey); if (index != -1) { _cursorTopics[index] = topic; } } }