pjsip: Move from threadpool to taskpool

This change moves the PJSIP module from the threadpool API
to the taskpool API. PJSIP-specific implementations for
task usage have been removed and replaced with calls to
the optimized taskpool implementations instead. The need
for a pool of serializers has also been removed as
taskpool inherently provides this. The default settings
have also been changed to be more realistic for common
usage.

UpgradeNote: The threadpool_* options in pjsip.conf have now
been deprecated though they continue to be read and used.
They have been replaced with taskpool options that give greater
control over the underlying taskpool used for PJSIP. An alembic
upgrade script has been added to add these options to realtime
as well.
This commit is contained in:
Joshua C. Colp
2025-09-23 18:54:22 -03:00
parent cc19b3b3b2
commit 6b8e4b6106
21 changed files with 284 additions and 274 deletions

View File

@@ -0,0 +1,29 @@
"""add taskpool options to system
Revision ID: dc7c357dc178
Revises: abdc9ede147d
Create Date: 2025-09-24 09:45:17.609185
"""
# revision identifiers, used by Alembic.
revision = 'dc7c357dc178'
down_revision = 'abdc9ede147d'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('ps_systems', sa.Column('taskpool_minimum_size', sa.Integer))
op.add_column('ps_systems', sa.Column('taskpool_initial_size', sa.Integer))
op.add_column('ps_systems', sa.Column('taskpool_auto_increment', sa.Integer))
op.add_column('ps_systems', sa.Column('taskpool_idle_timeout', sa.Integer))
op.add_column('ps_systems', sa.Column('taskpool_max_size', sa.Integer))
def downgrade():
op.drop_column('ps_systems', 'taskpool_minimum_size')
op.drop_column('ps_systems', 'taskpool_initial_size')
op.drop_column('ps_systems', 'taskpool_auto_increment')
op.drop_column('ps_systems', 'taskpool_idle_timeout')
op.drop_column('ps_systems', 'taskpool_max_size')