Wait for the destruction of sessions before tearing down main thread
The main thread can no longer assume that it is the last thread to
use the session objects (since they are now ref-counted). Hence,
this commit introduces utils to allow the main thread to wait for
the destruction of all sessions.
The logic of the teardown is as follows:
1) The main thread waits for activity on the quit pipe.
2) Once the main thread unblocks, the main thread waits for the
client thread to stop in order to guarantee that no new sessions
are created.
3) The main thread then waits for the session list to be emptied
4) Once the session list is empty, continue the rest of the teardown
as usual.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.029948 seconds and 5 git commands to generate.