Example #1
0
        public virtual bool WaitTillEmpty(TimeSpan timeout)
        {
            DateTime start = DateTime.Now;

            while (actorMessages.Any())
            {
                System.Threading.Thread.Sleep(1000);

                if ((DateTime.Now - start) > timeout)
                {
                    return(false);
                }
            }

            return(true);
        }