Thread thr1 = new Thread(new ThreadStart(Thread1));
Thread thr2 = new Thread(new ThreadStart(Thread2));
Thread thr3 = new Thread(new ThreadStart(Thread3));
Thread thr4 = new Thread(new ThreadStart(Thread4));
Thread thr5 = new Thread(new ThreadStart(Thread5));
thr1.Start();
thr2.Start();
thr3.Start();
thr4.Start();
thr5.Start();
我想在1000毫秒後停止每個線程。如何在定義特定時間後中止多線程中的線程?
因此,確保無論每個ThreadX正在運行,它在1000毫秒內完成。不要中止線程。永遠。 – spender