void valvula_exit_ctx ( ValvulaCtx ctx,
axl_bool  free_ctx 
)

Terminates the valvula library execution on the provided context.

Stops all internal valvula process and all allocated resources associated to the context. It also close all channels for all connection that where not closed until call this function.

This function is reentrant, allowing several threads to call valvula_exit_ctx function at the same time. Only one thread will actually release resources allocated.

Parameters
ctxThe context to terminate. The function do not dealloc the context provided.
free_ctxAllows to signal the function if the context provided must be deallocated (by calling to valvula_ctx_free).

Notes about calling to terminate valvula from inside its handlers:

Currently this is allowed and supported only in the following handlers:

The rest of handlers has being not tested.

References valvula_ctx_free2(), valvula_init_check(), valvula_mutex_destroy(), valvula_mutex_lock(), and valvula_mutex_unlock().