g****n 发帖数: 18 | 1 Hello everyone,
I have a question about Java thread sync. Following is part of the code that I
am having trouble with,
while (listening)
{
System.out.println("Waiting for a client...");
new MultiThread(group, serverSocket.accept(), h).start();
trackTime = h.getTime();
System.out.println("Track time " + trackTime);
System.out.println("Load: " + group.activeCount());
}
In it, h is a structure with public function getTime(). The MultiThread will
m | c****e 发帖数: 90 | 2 没看明白,那个time到底是嘛玩意儿?
你要记录什么?
I
instance
【在 g****n 的大作中提到】 : Hello everyone, : I have a question about Java thread sync. Following is part of the code that I : am having trouble with, : while (listening) : { : System.out.println("Waiting for a client..."); : new MultiThread(group, serverSocket.accept(), h).start(); : trackTime = h.getTime(); : System.out.println("Track time " + trackTime); : System.out.println("Load: " + group.activeCount());
| g*****n 发帖数: 37 | 3 MultiServerThread.join().
【在 g****n 的大作中提到】 : Hello everyone, : I have a question about Java thread sync. Following is part of the code that I : am having trouble with, : while (listening) : { : System.out.println("Waiting for a client..."); : new MultiThread(group, serverSocket.accept(), h).start(); : trackTime = h.getTime(); : System.out.println("Track time " + trackTime); : System.out.println("Load: " + group.activeCount());
|
|