question on single thread & multithread# Java - 爪哇娇娃
g*n
1 楼
Hello everyone,
I am new to Java and have to ask a simple question.
I am writing a program that has two sockets s1 and s2.
s1 listens to a single client and uses a single thread
s2 listens to possible multiple clients and uses a multithread to track number
of connections, by group.activeCount();
It requires both the single thread and multithread run at the same time. And
the multithread's group.activeCount() needs to be passed to the single thread
every time a thread in the multithread starts or
I am new to Java and have to ask a simple question.
I am writing a program that has two sockets s1 and s2.
s1 listens to a single client and uses a single thread
s2 listens to possible multiple clients and uses a multithread to track number
of connections, by group.activeCount();
It requires both the single thread and multithread run at the same time. And
the multithread's group.activeCount() needs to be passed to the single thread
every time a thread in the multithread starts or