Exemple #1
0
        public static void Main(string[] args)
        {
            var husband = new Diner("Bob");
            var wife    = new Diner("Alice");

            var spool = new Spoon(husband);

            Task.WaitAll(
                Task.Run(() => husband.EatWith(spool, wife)),
                Task.Run(() => wife.EatWith(spool, husband))
                );
        }