public void ExecuteLowPrioCommandAsync(Command command, EventHandler <CommandExecutedEventArgs> callback) { lock (queue) { if (!queue.Any(q => q.Key.Type != command.Type)) { queue.Enqueue(new KeyValuePair <Command, EventHandler <CommandExecutedEventArgs> >(command, callback), 1); resetEvent.Set(); } } }