Exemple #1
0
        public void Start(BusPath path)
        {
            busPath = path;
            var t = new Task(this.Run);

            t.Start();
        }
Exemple #2
0
        internal void Start(BusPath path)
        {
            busPath    = path;
            Places     = new Semaphore(30, 30);
            StationIn  = new ManualResetEvent(false);
            StationOut = new ManualResetEvent(false);
            var t = new Task(Run);

            t.Start();
            t.Wait();
        }
Exemple #3
0
        static void Main(string[] args)
        {
            var bp = new BusPath(10);
            var b  = new Bus();
            var t  = new Task(async() =>
            {
                b.Start(bp);
            });

            t.Start();
            t.Wait();
        }