new PIClientServer::ClientBase::stopAndWait() method for blocking stop read.
PIClientServer::ClientBase::close() now non-blocking
This commit is contained in:
@@ -154,7 +154,7 @@ TEST(ClientServer, DynamicClients) {
|
||||
auto s = createServer<true, true, 10_KiB>();
|
||||
|
||||
const auto spawnClient = [&clients, &clients_mutex]() {
|
||||
if (clients.size() > 100) return;
|
||||
// if (clients.size() > 100) return;
|
||||
auto c = new ClientSendThread();
|
||||
c->startSend();
|
||||
clients_mutex.lock();
|
||||
@@ -180,7 +180,7 @@ TEST(ClientServer, DynamicClients) {
|
||||
}
|
||||
piCout << "+++++++";
|
||||
},
|
||||
52_Hz);
|
||||
12_Hz);
|
||||
|
||||
deleteThread.start(
|
||||
[&clients, &clients_mutex]() {
|
||||
@@ -199,9 +199,9 @@ TEST(ClientServer, DynamicClients) {
|
||||
}
|
||||
piCout << "----------";
|
||||
},
|
||||
53_Hz);
|
||||
13_Hz);
|
||||
|
||||
(10_s).sleep();
|
||||
(2_s).sleep();
|
||||
|
||||
EXPECT_GE(s->clientsCount(), 10);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user