예제 #1
0
        private static void Main()
        {
            Supervisor sup = new Supervisor();
            sup.Process();

            Thread.Sleep(5000);
            Console.WriteLine("Final value of readers on sup is {0}", sup.Readers);
            Console.WriteLine("{0} writers was spawned", sup.writersSpawned);
            Console.WriteLine("{0} readers was spawned", sup.readersSpawned);

            Console.ReadKey();
        }
예제 #2
0
 public Reader(Supervisor supervisor, string path)
 {
     s = supervisor;
     _path = path;
 }
예제 #3
0
 public Writer(string P, Supervisor S)
 {
     path = P;
     supervisor = S;
 }