public static void Main1() { Nm nm = new Nm(); nm.create(); while (true) { qv("loop start"); gbWhile = true; var nos = new List <No>(); for (int i = 0; i < 10; i++) { No no = new No(nm); no.create(); nos.Add(no); } foreach (var no in nos) { no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); } int wc = 0; while (gbWhile) { wc++; //qv("while wc:" + wc); //no.naiWrite(new Ni(Nit.Test1)); //if (wc == 20) { nos.First().naiWrite(new Ni(Nit.Test2)); } System.Threading.Thread.Sleep(100); } qv("end1 - no.release()"); foreach (var no in nos) { no.release(); } } qv("end2 - nm.release()"); nm.release(); qv("end3 - app"); }
public static void Main1() { while (true) { gbWhile = true; Nm nm = new Nm(); nm.create(); No no = new No(nm); no.create(); qv("naiWrite"); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); no.naiWrite(new Ni(Nit.Test1)); int wc = 0; while (gbWhile) { //wc++; //qv("while wc:" + wc); //no.naiWrite(new Ni(Nit.Test1)); //if (wc == 50) { no.naiWrite(new Ni(Nit.Test2)); } System.Threading.Thread.Sleep(50); } qv("end1"); no.release(); qv("end2"); nm.release(); qv("end3"); } }