I have a problem, think so, testing a simple TcpServer(TimeServer) when I use prstat I see:
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
28626 user8600K 5240K sleep 59 0 0:00:00 0.0% TimeServer/13
Why there is 13 LWP????
1) The example TimeServer was modified to send and receive messages in the run method of the class TimeServerConnection:
char buffer[500];
int len = sizeof(buffer);
memset(buffer,0,sizeof(buffer));
int result = socket().receiveBytes(buffer,len);
while (result > 0 ) {
Timestamp now;
std::string dt(DateTimeFormatter::format(now, _format));
dt.append("
");
std::cout << "sending " << dt.data() << " len " << dt.length() << std::endl;
result = socket().sendBytes(dt.data(), (int) dt.length());
if (result >0 )
result = socket().receiveBytes(buffer,len);
}
2) I use a TcpClient (in Java) which send 10 threads simultaneous to TimeServer, the testing work fine but it finish with 13 LWP (and initialize with 4 LWP)
Thanks for your anwers





