谁能告诉我最后两行代码之间发生了什么
// Creating Server and Client threads
pthread_create(&serverThread, NULL, (void* (*)(void*))&Server,(void *)0);
pthread_create(&clientThread, NULL, (void* (*)(void*))&Client,(void *)1);
// Wait until serverThread exits
pthread_join( serverThread, NULL);
// Wait until clientThread exits
pthread_join( clientThread, NULL);
我想同时等他们。如果两个线程之一终止/退出怎么办?如果服务器一直在无限循环中运行怎么办?