Пример #1
0
        protected bool ExecuteMsg(int millis)
        {
            System.Diagnostics.Debug.Assert(!InvokeRequired);
            System.Diagnostics.Debug.Assert(forwarder == null);

            Message msg = null;

            try
            {
                msg = GetNextMessage(millis);
            }
            catch (InvalidOperationException)
            {
                // Semaphore released but no message was posted
            }
            if (msg != null)
            {
                msg.Execute();
            }

            return(msg != null);
        }