예제 #1
0
파일: MtServer.cs 프로젝트: plexzhang/mtapi
        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();
            }
        }
예제 #2
0
        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();
            }
        }