예제 #1
0
파일: EmaiLib.cs 프로젝트: mutita/anpr
        void PushResultsLoop()
        {
            SEND_RESULT result;

            while (!m_Stop)
            {
                Thread.Sleep(10);

                result = m_SendResultQ.Dequeue();
                if (result != null)
                {
                    // look up the callback function to use in the hash table
                    object cb = m_SendResultEvents[result.Mail_Key];
                    if (cb != null)
                    {
                        SEND_RESULT_EVENT sendEvent = (SEND_RESULT_EVENT)cb;

                        // raise the event - notify the message originator of the result
                        sendEvent(result);

                        // remove the event handler from the hash table for this message
                        m_SendResultEvents.Remove(result.Mail_Key);
                    }
                }
            }
        }
예제 #2
0
 /// <summary>
 /// generates exception if index is not in the hashtable
 /// </summary>
 /// <param name="index"></param>
 public void ReleaseValue(int handle)
 {
     handleHashTable.Remove(handle);
 }