我正在尝试在 go 中转换以下线程的 java 语句;
int num = 5;
Thread[] threads = new Thread[5];
for (int i = 0; i < num; i++)
{
threads[i] = new Thread(new NewClass(i));
threads[i].start();
}
for (int i = 0; i < numT; i++)
threads[i].join();
我想知道,如何转换这个去?
谢谢