Merge "threadpool, res_pjsip: Add serializer group shutdown API calls." into 13

This commit is contained in:
Matt Jordan
2015-06-26 13:35:07 -05:00
committed by Gerrit Code Review
4 changed files with 207 additions and 11 deletions

View File

@@ -3322,20 +3322,25 @@ int ast_sip_append_body(pjsip_tx_data *tdata, const char *body_text)
return 0;
}
struct ast_taskprocessor *ast_sip_create_serializer(void)
struct ast_taskprocessor *ast_sip_create_serializer_group(struct ast_serializer_shutdown_group *shutdown_group)
{
struct ast_taskprocessor *serializer;
char name[AST_UUID_STR_LEN];
ast_uuid_generate_str(name, sizeof(name));
serializer = ast_threadpool_serializer(name, sip_threadpool);
serializer = ast_threadpool_serializer_group(name, sip_threadpool, shutdown_group);
if (!serializer) {
return NULL;
}
return serializer;
}
struct ast_taskprocessor *ast_sip_create_serializer(void)
{
return ast_sip_create_serializer_group(NULL);
}
int ast_sip_push_task(struct ast_taskprocessor *serializer, int (*sip_task)(void *), void *task_data)
{
if (serializer) {