static void Main(string[] args) { work_service work = new work_service(); strand = new work_strand(work); generator.go(strand, MainWorker); work.run(); Console.ReadKey(); }
static void Main(string[] args) { work_service work = new work_service(); _strand = new work_strand(work); _chan1 = chan <long> .make(_strand, 3); _chan2 = chan <long> .make(_strand, 0); _chan3 = chan <long> .make(_strand, -1); _csp = new csp_chan <long, long>(_strand); generator.go(_strand, Producer1); generator.go(_strand, Producer2); generator.go(_strand, Producer3); generator.go(_strand, Producer4); generator.go(_strand, Consumer); generator.go(_strand, () => Producer5(generator.tgo(_strand, Consumer2))); work.run(); }