void mExecutorManager_CommandExecuted(object sender, MtCommandExecuteEventArgs e) { EventWaitHandle responseWaiter = null; lock (mResponseLocker) { if (mResponseWaiters.ContainsKey(e.Command) == true) { responseWaiter = mResponseWaiters[e.Command]; mResponses[e.Command] = e.Response; } } if (responseWaiter != null) { responseWaiter.Set(); } }