Ejemplo n.º 1
0
            public int Purge()
            {
                if (tasks.IsEmpty())
                {
                    return(0);
                }

                // callers are synchronized
                tasks.deletedCancelledNumber = 0;
                tasks.DeleteIfCancelled();
                return(tasks.deletedCancelledNumber);
            }