Skip to content
Snippets Groups Projects
Commit 4ed4e4da authored by Avi Kivity's avatar Avi Kivity Committed by Pekka Enberg
Browse files

tst-tcp: clean up better after threads


Make sure to wait until the running thread count drops to zero
before destroying things.

Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent b38cd33b
No related branches found
No related tags found
No related merge requests found
......@@ -186,9 +186,11 @@ void tcp_test_client::run()
}
_condvar.wait(lock);
_completed_threads.clear();
if (_ex) {
rethrow_exception(_ex);
}
}
_condvar.wait(lock, [&] { return !_running_threads; });
_completed_threads.clear();
if (_ex) {
rethrow_exception(_ex);
}
cout << "created " << _connections_completed << " connections\n";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment