void vortex_listener_wait ( VortexCtx ctx)

Blocks a listener (or listeners) launched until vortex finish.

This function should be called after creating a listener (o listeners) calling to vortex_listener_new to block current thread.

This function can be avoided if the program structure can ensure that the programm will not exist after calling vortex_listener_new. This happens when the program is linked to (or implements) and internal event loop.

This function will be unblocked when the vortex listener created ends or a failure have occur while creating the listener. To force an unlocking, a call to vortex_listener_unlock must be done.

Parameters
ctxThe context where the operation will be performed.

References vortex_async_queue_new(), vortex_async_queue_pop(), vortex_async_queue_unref(), vortex_ctx_get_data(), vortex_mutex_lock(), and vortex_mutex_unlock().