Add initial simple threadpool test.

This one simply pushes a task into the threadpool and ensures
that the listener gets the callbacks expected.

It currently crashes, so I need to figure out what's wrong.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2012-12-06 20:25:17 +00:00
parent c81367bd9f
commit c32634e0dd
2 changed files with 262 additions and 2 deletions

View File

@@ -264,8 +264,6 @@ static void *threadpool_alloc(struct ast_taskprocessor_listener *listener)
return NULL;
}
pool->tps = listener->tps;
ao2_ref(pool, +1);
return pool;
}
@@ -624,6 +622,7 @@ struct ast_threadpool *ast_threadpool_create(struct ast_threadpool_listener *lis
}
pool = tps_listener->private_data;
pool->tps = tps;
ast_threadpool_set_size(pool, initial_size);
return pool;
}