int valvula_thread_pool_get_num ( void  )

Returns how many threads have the given ValvulaThreadPool.

This function is for internal valvula library purpose. This function returns how many thread must be created inside the valvula thread pool which actually is the one which dispatch all frame received callback and other async notifications.

This function pay attention to the environment var "VALVULA_THREADS" so user can control how many thread are created. In case this var is not defined the function will return 5. In case the var is defined but using a wrong value, that is, an non positive integer, the function will abort the valvula execution and consequently the application over it.

Returns
the number of threads to be created.

References valvula_support_getenv_int().

Referenced by valvula_init_ctx().