public void Start(BusPath path) { busPath = path; var t = new Task(this.Run); t.Start(); }
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(); }
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(); }