do not start sendq thread if async mode is disabled
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
ed551eecc1
commit
20d8ef6f0d
2 changed files with 14 additions and 4 deletions
|
@ -1125,8 +1125,11 @@ int rtps_init (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nn_xpack_sendq_init();
|
if (config.xpack_send_async)
|
||||||
nn_xpack_sendq_start();
|
{
|
||||||
|
nn_xpack_sendq_init();
|
||||||
|
nn_xpack_sendq_start();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DDSI_INCLUDE_NETWORK_CHANNELS
|
#ifdef DDSI_INCLUDE_NETWORK_CHANNELS
|
||||||
/* Create a delivery queue and start tev for each channel */
|
/* Create a delivery queue and start tev for each channel */
|
||||||
|
@ -1413,8 +1416,11 @@ void rtps_term (void)
|
||||||
|
|
||||||
xeventq_free (gv.xevents);
|
xeventq_free (gv.xevents);
|
||||||
|
|
||||||
nn_xpack_sendq_stop();
|
if (config.xpack_send_async)
|
||||||
nn_xpack_sendq_fini();
|
{
|
||||||
|
nn_xpack_sendq_stop();
|
||||||
|
nn_xpack_sendq_fini();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DDSI_INCLUDE_NETWORK_CHANNELS
|
#ifdef DDSI_INCLUDE_NETWORK_CHANNELS
|
||||||
chptr = config.channels;
|
chptr = config.channels;
|
||||||
|
|
|
@ -1236,6 +1236,10 @@ struct nn_xpack * nn_xpack_new (ddsi_tran_conn_t conn, uint32_t bw_limit, bool a
|
||||||
const nn_vendorid_t myvendorid = MY_VENDOR_ID;
|
const nn_vendorid_t myvendorid = MY_VENDOR_ID;
|
||||||
struct nn_xpack *xp;
|
struct nn_xpack *xp;
|
||||||
|
|
||||||
|
/* Disallow setting async_mode if not configured to enable async mode: this way we
|
||||||
|
can avoid starting the async send thread altogether */
|
||||||
|
assert (!async_mode || config.xpack_send_async);
|
||||||
|
|
||||||
xp = os_malloc (sizeof (*xp));
|
xp = os_malloc (sizeof (*xp));
|
||||||
memset (xp, 0, sizeof (*xp));
|
memset (xp, 0, sizeof (*xp));
|
||||||
xp->async_mode = async_mode;
|
xp->async_mode = async_mode;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue