diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-12-06 20:25:17 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-12-06 20:25:17 +0000 |
commit | c32634e0dd003683cbcd95046c58e9418cfff12d (patch) | |
tree | c57836d2d424df59f57e3d8a348033df2475ddca /main | |
parent | c81367bd9fddfee6dcf76a3957fc348f25f42452 (diff) |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/threadpool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/threadpool.c b/main/threadpool.c index 8662c3a39..bc0187f1e 100644 --- a/main/threadpool.c +++ b/main/threadpool.c @@ -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; } |